You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DS7/BookingJieFeng/Models/Enums.cs

247 lines
3.8 KiB
C#

3 years ago
using Resources;
using System.ComponentModel;
public enum UserIdentiState
{
NotIndent = 0,
Identifying = 1,
Indentified = 2,
Reject = 3
}
public enum UserStatus
{
//NotActive = 0,
Active = 1,
Disabled = 2
}
public enum OrderStatus
{
Create,
Submit,
Confirm,
Back,
Cancel
}
public static class OrderStatusExt
{
public static string GetDesp(this OrderStatus status)
{
if (status == OrderStatus.Create)
{
return LangOrder.OrderStatusCreate;
}
else if (status == OrderStatus.Submit)
{
return LangOrder.OrderStatusSubmit;
}
else if (status == OrderStatus.Confirm)
{
return "已接收订舱";
}
else if (status == OrderStatus.Back)
{
return "退舱";
}
else if (status == OrderStatus.Cancel)
{
return "已取消";
}
return "";
}
}
/// <summary>
/// 截单状态(订舱的截单状态)
/// </summary>
public enum OrderConfirmStatus
{
None,
Create,
Submit,
Confirm,
Reject
}
public static class SIStatusExt
{
public static string GetDesp(this OrderConfirmStatus status)
{
if (status == OrderConfirmStatus.None)
{
return LangOrder.SIStatusNone;
}
else if (status == OrderConfirmStatus.Create)
{
return LangOrder.SIStatusCreate;
}
else if (status == OrderConfirmStatus.Submit)
{
return LangOrder.SIStatusSubmit;
}
else if (status == OrderConfirmStatus.Confirm)
{
return LangOrder.SIStatusConfirm;
}
else if (status == OrderConfirmStatus.Reject)
{
return LangOrder.SIStatusReject;
}
return "";
}
}
public enum TemplateCate
{
Order,
Confirm,
Shipping,
ShippingShipper,
ShippingConsignee,
ShippingNotify
}
public enum OpLogModule
{
//订舱
Order,
//截单
Confirm,
//舱单
Shipping
}
public static class OpLogModuleExt
{
public static string GetDesp(this OpLogModule status)
{
if (status == OpLogModule.Order)
{
return "订舱";
}
else if (status == OpLogModule.Confirm)
{
return "截单";
}
else if (status == OpLogModule.Shipping)
{
return "舱单";
}
return "";
}
}
public enum OpLogType
{
//保存
Save,
//提交
Submit,
//取消
Cancel
}
public static class OpLogTypeExt
{
public static string GetDesp(this OpLogType status)
{
if (status == OpLogType.Save)
{
return LangLog.OpLogTypeSave;
}
else if (status == OpLogType.Submit)
{
return LangLog.OpLogTypeSubmit;
}
else if (status == OpLogType.Cancel)
{
return LangLog.OpLogTypeCancel;
}
return "";
}
}
/// <summary>
/// 订单日志状态(从订舱到截单状态日志)
/// </summary>
public enum OrderLogStatus
{
OrderSave,
OrderSubmit,
OrderConfirm,
ConfirmSave,
ConfirmSubmit,
ConfirmConfirm,
OrderCancel
}
public enum SendMailStatus
{
Create,
Sending,
Success,
Fail
}
public enum SendMailBodyType
{
Text
}
/// <summary>
/// 舱单状态
/// </summary>
public enum ShippingStatus
{
Create,
Submit
}
public static class ShippingStatusExt
{
public static string GetDesp(this ShippingStatus status)
{
if (status == ShippingStatus.Create)
{
return "创建";
}
else if (status == ShippingStatus.Submit)
{
return "提交";
}
return "";
}
}