Example #1
0
        public static Order ToEntity(ViewOrder model)
        {
            Order item = new Order();

            item.Id          = model.Id;
            item.Phone       = model.Phone;
            item.Name        = model.Name;
            item.Number      = model.Number;
            item.Amount      = model.Amount;
            item.Description = model.Description;
            item.PayAccount  = model.PayAccount;
            item.Payment     = model.Payment;
            item.IsPaid      = model.IsPaid;
            item.UserId      = model.UserId;
            item.ClassId     = model.ClassId;
            item.Status      = model.Status;
            item.IsDeleted   = model.IsDeleted;
            item.CreateTime  = model.CreateTime;
            item.PayTime     = model.PayTime;
            item.PayNO       = model.PayNO;
            item.PayDomain   = model.PayDomain;
            item.openid      = model.OpenID;
            item.Class       = model.Class;
            return(item);
        }
Example #2
0
        public static ViewOrder ToViewModel(Order model)
        {
            if (model == null)
            {
                return(null);
            }

            ViewOrder item = new ViewOrder();

            item.Id          = model.Id;
            item.Phone       = model.Phone;
            item.Name        = model.Name;
            item.Number      = model.Number;
            item.Amount      = model.Amount;
            item.Description = model.Description;
            item.PayAccount  = model.PayAccount;
            item.Payment     = model.Payment;
            item.IsPaid      = model.IsPaid;
            item.UserId      = model.UserId;
            item.ClassId     = model.ClassId;
            item.Status      = model.Status;
            item.IsDeleted   = model.IsDeleted;
            item.CreateTime  = model.CreateTime;
            item.PayTime     = model.PayTime;
            item.PayNO       = model.PayNO;
            item.PayDomain   = model.PayDomain;
            item.OpenID      = model.openid;
            item.Class       = model.Class;

            return(item);
        }