Exemple #1
0
 public static bool Equals(ExportExcelAllType type, string typeStr)
 {
     if (string.IsNullOrEmpty(typeStr))
     {
         return(false);
     }
     if (string.Equals(GetValue(type).ToLower(), typeStr.ToLower()))
     {
         return(true);
     }
     return(false);
 }
Exemple #2
0
 public static bool Equals(string typeStr, ExportExcelAllType type)
 {
     return(Equals(type, typeStr));
 }
Exemple #3
0
        public static string GetText(ExportExcelAllType type)
        {
            if (type == ExportExcelAllType.GoodsId)
            {
                return("活动编号");
            }
            else if (type == ExportExcelAllType.GoodsName)
            {
                return("活动名称");
            }
            else if (type == ExportExcelAllType.ActShowCount)
            {
                return("场次");
            }
            else if (type == ExportExcelAllType.PeopleCount)
            {
                return("总人数");
            }
            else if (type == ExportExcelAllType.SellingPrice)
            {
                return("单价");
            }

            else if (type == ExportExcelAllType.TotalIncome)
            {
                return("总收入");
            }
            else if (type == ExportExcelAllType.PlatformCost)
            {
                return("平台服务费");
            }
            else if (type == ExportExcelAllType.ResponsiblePersonProfit)
            {
                return("站长服务费");
            }
            else if (type == ExportExcelAllType.SumShareProfit)
            {
                return("分销渠道费");
            }
            else if (type == ExportExcelAllType.OtherCost)
            {
                return("其他费用");
            }
            else if (type == ExportExcelAllType.TotalPrice)
            {
                return("总费用");
            }
            else if (type == ExportExcelAllType.TotalProfit)
            {
                return("总利润");
            }
            else if (type == ExportExcelAllType.OrderId)
            {
                return("订单编号");
            }
            else if (type == ExportExcelAllType.Count)
            {
                return("数量");
            }
            else if (type == ExportExcelAllType.VisitTime)
            {
                return("参加时间");
            }
            else if (type == ExportExcelAllType.UserId)
            {
                return("用户编号");
            }
            else if (type == ExportExcelAllType.OrderPrice)
            {
                return("订单价格");
            }
            else if (type == ExportExcelAllType.OrderStatus)
            {
                return("订单状态");
            }
            else if (type == ExportExcelAllType.CreateTime)
            {
                return("创建时间");
            }
            else
            {
                throw new Exception();
            }
        }
Exemple #4
0
        public static ExportExcelAllType GetEnumType(string typeStr)
        {
            ExportExcelAllType retval = ExportExcelAllType.GoodsId;

            if (Equals(ExportExcelAllType.GoodsId, typeStr))
            {
                retval = ExportExcelAllType.GoodsId;
            }
            else if (Equals(ExportExcelAllType.GoodsName, typeStr))
            {
                retval = ExportExcelAllType.GoodsName;
            }
            else if (Equals(ExportExcelAllType.ActShowCount, typeStr))
            {
                retval = ExportExcelAllType.ActShowCount;
            }
            else if (Equals(ExportExcelAllType.PeopleCount, typeStr))
            {
                retval = ExportExcelAllType.PeopleCount;
            }
            else if (Equals(ExportExcelAllType.SellingPrice, typeStr))
            {
                retval = ExportExcelAllType.SellingPrice;
            }
            else if (Equals(ExportExcelAllType.TotalIncome, typeStr))
            {
                retval = ExportExcelAllType.TotalIncome;
            }
            else if (Equals(ExportExcelAllType.PlatformCost, typeStr))
            {
                retval = ExportExcelAllType.PlatformCost;
            }
            else if (Equals(ExportExcelAllType.ResponsiblePersonProfit, typeStr))
            {
                retval = ExportExcelAllType.ResponsiblePersonProfit;
            }
            else if (Equals(ExportExcelAllType.SumShareProfit, typeStr))
            {
                retval = ExportExcelAllType.SumShareProfit;
            }
            else if (Equals(ExportExcelAllType.OtherCost, typeStr))
            {
                retval = ExportExcelAllType.OtherCost;
            }
            else if (Equals(ExportExcelAllType.TotalPrice, typeStr))
            {
                retval = ExportExcelAllType.TotalPrice;
            }
            else if (Equals(ExportExcelAllType.TotalProfit, typeStr))
            {
                retval = ExportExcelAllType.TotalProfit;
            }
            else if (Equals(ExportExcelAllType.OrderId, typeStr))
            {
                retval = ExportExcelAllType.OrderId;
            }
            else if (Equals(ExportExcelAllType.Count, typeStr))
            {
                retval = ExportExcelAllType.Count;
            }
            else if (Equals(ExportExcelAllType.VisitTime, typeStr))
            {
                retval = ExportExcelAllType.VisitTime;
            }
            else if (Equals(ExportExcelAllType.UserId, typeStr))
            {
                retval = ExportExcelAllType.UserId;
            }
            else if (Equals(ExportExcelAllType.OrderPrice, typeStr))
            {
                retval = ExportExcelAllType.OrderPrice;
            }
            else if (Equals(ExportExcelAllType.OrderStatus, typeStr))
            {
                retval = ExportExcelAllType.OrderStatus;
            }
            else if (Equals(ExportExcelAllType.CreateTime, typeStr))
            {
                retval = ExportExcelAllType.CreateTime;
            }
            return(retval);
        }
Exemple #5
0
 public static string GetValue(ExportExcelAllType type)
 {
     if (type == ExportExcelAllType.GoodsId)
     {
         return("GoodsId");
     }
     else if (type == ExportExcelAllType.GoodsName)
     {
         return("GoodsName");
     }
     else if (type == ExportExcelAllType.ActShowCount)
     {
         return("ActShowCount");
     }
     else if (type == ExportExcelAllType.PeopleCount)
     {
         return("PeopleCount");
     }
     else if (type == ExportExcelAllType.SellingPrice)
     {
         return("SellingPrice");
     }
     else if (type == ExportExcelAllType.TotalIncome)
     {
         return("TotalIncome");
     }
     else if (type == ExportExcelAllType.PlatformCost)
     {
         return("PlatformCost");
     }
     else if (type == ExportExcelAllType.ResponsiblePersonProfit)
     {
         return("ResponsiblePersonProfit");
     }
     else if (type == ExportExcelAllType.SumShareProfit)
     {
         return("SumShareProfit");
     }
     else if (type == ExportExcelAllType.OtherCost)
     {
         return("OtherCost");
     }
     else if (type == ExportExcelAllType.TotalPrice)
     {
         return("TotalPrice");
     }
     else if (type == ExportExcelAllType.TotalProfit)
     {
         return("TotalProfit");
     }
     else if (type == ExportExcelAllType.OrderId)
     {
         return("OrderId");
     }
     else if (type == ExportExcelAllType.Count)
     {
         return("Count");
     }
     else if (type == ExportExcelAllType.VisitTime)
     {
         return("VisitTime");
     }
     else if (type == ExportExcelAllType.UserId)
     {
         return("UserId");
     }
     else if (type == ExportExcelAllType.OrderPrice)
     {
         return("OrderPrice");
     }
     else if (type == ExportExcelAllType.OrderStatus)
     {
         return("OrderStatus");
     }
     else if (type == ExportExcelAllType.CreateTime)
     {
         return("CreateTime");
     }
     else
     {
         throw new Exception();
     }
 }