コード例 #1
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="addressId">客户地址Id</param>
 /// <param name="groupId">查询条件客户分组Id</param>
 /// <param name="name">查询条件客户名称</param>
 public AddModel(string addressId, string groupId, string name)
 {
     this.AddressId    = addressId;
     this.QueryGroupId = groupId;
     this.QueryName    = name;
     this.DateString   = DataConvert.ConvertDateToString(DataConvert.ConvertNowUTCToBeijing());
 }
コード例 #2
0
        public ActionResult First(string id, string linkMan)
        {
            SaleOrderFirstModel model = new SaleOrderFirstModel(id, linkMan);
            SaleOrderAddDTO     dto;

            if (string.IsNullOrWhiteSpace(model.Id))
            {
                model.NewId();
                model.DateString = model.CurrentDate;
                model.Unit       = "---";
                dto                    = new SaleOrderAddDTO();
                dto.Creator            = this.Session["Mobile"].ToString();
                this.Session[model.Id] = dto;
            }
            else
            {
                if (this.Session[model.Id] == null)
                {
                    this.Session[model.Id] = new SaleOrderAddDTO();
                }
                dto = (SaleOrderAddDTO)this.Session[model.Id];
                model.DateString = DataConvert.ConvertDateToString(dto.Date);
                model.Item       = dto.Item;
                model.Quantity   = dto.Quantity;
                model.Unit       = dto.Unit;
                model.Remark     = dto.Remark;
            }
            return(View(model));
        }
コード例 #3
0
ファイル: DetailModel.cs プロジェクト: liunc/EasySoft-PssS
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="id">Id</param>
        /// <param name="item">选中项</param>
        /// <param name="page">当前索引</param>
        public DetailModel(Entity.SaleOrder entity, string item, string status, int page)
        {
            this.Id           = entity.Id;
            this.Item         = entity.Item;
            this.Address      = entity.Address;
            this.Mobile       = entity.Mobile;
            this.Linkman      = entity.Linkman;
            this.Date         = DataConvert.ConvertDateToString(entity.Date);
            this.Unit         = entity.Unit;
            this.Price        = entity.Price;
            this.Quantity     = entity.Quantity;
            this.Remark       = entity.Remark;
            this.RecordId     = entity.RecordId;
            this.Discount     = entity.Discount;
            this.ActualAmount = entity.ActualAmount;
            this.Status       = entity.Status;
            this.QueryStatus  = status;
            if (string.IsNullOrWhiteSpace(this.Remark))
            {
                this.Remark = WebResource.Common_None;
            }

            this.SelectedItem = item;
            this.PageIndex    = page;
        }
コード例 #4
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="entity">实体模型对象</param>
 public PurchaseDeliveryModel(Purchase entity)
 {
     this.Id        = entity.Id;
     this.Item      = entity.Item;
     this.Date      = DataConvert.ConvertDateToString(entity.Date);
     this.Unit      = entity.Unit;
     this.Supplier  = entity.Supplier;
     this.Inventory = entity.Inventory;
 }
コード例 #5
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="entity">实体模型对象</param>
 public SaleOrderNeedExpressModel(SaleOrder entity)
 {
     this.Id       = entity.Id;
     this.Item     = entity.Item;
     this.Date     = DataConvert.ConvertDateToString(entity.Date);
     this.Address  = entity.Address;
     this.Mobile   = entity.Mobile;
     this.Linkman  = entity.Linkman;
     this.Quantity = entity.Quantity;
     this.Unit     = entity.Unit;
 }
コード例 #6
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="entity">实体模型对象</param>
 public DeliveryPageModel(Delivery entity)
 {
     this.Id             = entity.Id;
     this.ExpressCompany = entity.ExpressCompany;
     this.Date           = DataConvert.ConvertDateToString(entity.Date);
     this.ExpressBill    = entity.ExpressBill;
     this.IncludeOrder   = entity.IncludeOrder;
     this.Summary        = entity.Summary;
     this.Remark         = entity.Remark;
     if (string.IsNullOrWhiteSpace(this.Remark))
     {
         this.Remark = WebResource.Common_None;
     }
 }
コード例 #7
0
        public ActionResult Fourth(string id)
        {
            DeliveryFourthModel model = new DeliveryFourthModel(id);

            if (string.IsNullOrWhiteSpace(model.Id) || this.Session[model.Id] == null)
            {
                return(RedirectToAction("First", "Delivery"));
            }
            DeliveryAddDTO dto = (DeliveryAddDTO)this.Session[model.Id];

            model.CurrentDate    = DataConvert.ConvertDateToString(dto.Date);
            model.ExpressCompany = dto.ExpressCompany;
            model.ExpressBill    = dto.ExpressBill;
            model.Remark         = dto.Remark;
            return(View(model));
        }
コード例 #8
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="entity">实体模型对象</param>
 public PurchasePageModel(Purchase entity)
 {
     this.Id         = entity.Id;
     this.Item       = entity.Item;
     this.Date       = DataConvert.ConvertDateToString(entity.Date);
     this.Unit       = entity.Unit;
     this.Quantity   = entity.Quantity;
     this.ProfitLoss = entity.ProfitLoss;
     this.Supplier   = entity.Supplier;
     this.Remark     = entity.Remark;
     if (string.IsNullOrWhiteSpace(this.Remark))
     {
         this.Remark = WebResource.Common_None;
     }
     this.Inventory = entity.Inventory;
     this.Cost      = entity.Cost;
 }
コード例 #9
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="entity">实体模型对象</param>
 public SaleOrderPageModel(SaleOrder entity)
 {
     this.Id           = entity.Id;
     this.Item         = entity.Item;
     this.Date         = DataConvert.ConvertDateToString(entity.Date);
     this.Address      = entity.Address;
     this.Mobile       = entity.Mobile;
     this.Linkman      = entity.Linkman;
     this.Unit         = entity.Unit;
     this.Quantity     = entity.Quantity;
     this.NeedExpress  = entity.NeedExpress;
     this.Price        = entity.Price;
     this.ActualAmount = entity.ActualAmount;
     this.Discount     = entity.Discount;
     this.Status       = entity.Status;
     this.Remark       = entity.Remark;
 }
コード例 #10
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="entity">实体模型对象</param>
 public PurchaseDetailModel(Purchase entity, string item, int page)
 {
     this.Id              = entity.Id;
     this.Category        = entity.Category;
     this.ParentPageTitle = WebResource.Title_Purchase_Product;
     this.SelectedItem    = item;
     this.PageIndex       = page;
     if (entity.Category == PurchaseItemCategory.Pack)
     {
         this.ParentPageTitle = WebResource.Title_Purchase_Pack;
     }
     this.Item       = entity.Item;
     this.Date       = DataConvert.ConvertDateToString(entity.Date);
     this.Unit       = entity.Unit;
     this.Quantity   = entity.Quantity;
     this.ProfitLoss = entity.ProfitLoss;
     this.Supplier   = entity.Supplier;
     this.Remark     = entity.Remark;
     this.Status     = entity.Status;
     if (string.IsNullOrWhiteSpace(this.Remark))
     {
         this.Remark = WebResource.Common_None;
     }
     this.Inventory = entity.Inventory;
     this.Cost      = entity.Cost;
     if (this.Status == PurchaseStatus.Finished)
     {
         this.ControlWidth = 12;
     }
     else
     {
         if (this.Status == PurchaseStatus.None)
         {
             this.ControlWidth = 3;
         }
         else
         {
             this.ControlWidth = 4;
         }
     }
 }