protected override ORD_PublishDetail FillDetailModel(IDataReader dr) { ORD_PublishDetail m = new ORD_PublishDetail(); if (!string.IsNullOrEmpty(dr["ID"].ToString())) { m.ID = (int)dr["ID"]; } if (!string.IsNullOrEmpty(dr["PublishID"].ToString())) { m.PublishID = (int)dr["PublishID"]; } if (!string.IsNullOrEmpty(dr["Product"].ToString())) { m.Product = (int)dr["Product"]; } if (!string.IsNullOrEmpty(dr["MinQuantity"].ToString())) { m.MinQuantity = (int)dr["MinQuantity"]; } if (!string.IsNullOrEmpty(dr["MaxQuantity"].ToString())) { m.MaxQuantity = (int)dr["MaxQuantity"]; } if (!string.IsNullOrEmpty(dr["AvailableQuantity"].ToString())) { m.AvailableQuantity = (int)dr["AvailableQuantity"]; } if (!string.IsNullOrEmpty(dr["Price"].ToString())) { m.Price = (decimal)dr["Price"]; } if (!string.IsNullOrEmpty(dr["Points"].ToString())) { m.Points = (decimal)dr["Points"]; } if (!string.IsNullOrEmpty(dr["Remark"].ToString())) { m.Remark = (string)dr["Remark"]; } if (!string.IsNullOrEmpty(dr["ExtPropertys"].ToString())) { m.ExtPropertys = SpiltExtProperty(m.ModelName, (string)dr["ExtPropertys"]); } //填充产品编号 try { PDT_ProductDAL productdal = new PDT_ProductDAL(); m.ProductCode = productdal.GetModel(m.Product).Code; } catch { } return(m); }
public PDT_ProductBLL(int id, bool bycache) : base(DALClassName) { _dal = (PDT_ProductDAL)_DAL; FillModel(id, bycache); }
public PDT_ProductBLL(int id) : base(DALClassName) { _dal = (PDT_ProductDAL)_DAL; FillModel(id); }
///<summary> ///PDT_ProductBLL ///</summary> public PDT_ProductBLL() : base(DALClassName) { _dal = (PDT_ProductDAL)_DAL; _m = new PDT_Product(); }
protected override SVM_JXCSummary FillModel(IDataReader dr) { SVM_JXCSummary m = new SVM_JXCSummary(); if (!string.IsNullOrEmpty(dr["ID"].ToString())) { m.ID = (int)dr["ID"]; } if (!string.IsNullOrEmpty(dr["AccountMonth"].ToString())) { m.AccountMonth = (int)dr["AccountMonth"]; } if (!string.IsNullOrEmpty(dr["Client"].ToString())) { m.Client = (int)dr["Client"]; } if (!string.IsNullOrEmpty(dr["OrganizeCity"].ToString())) { m.OrganizeCity = (int)dr["OrganizeCity"]; } if (!string.IsNullOrEmpty(dr["Product"].ToString())) { m.Product = (int)dr["Product"]; } if (!string.IsNullOrEmpty(dr["FactoryPrice"].ToString())) { m.FactoryPrice = (decimal)dr["FactoryPrice"]; } if (!string.IsNullOrEmpty(dr["SalesPrice"].ToString())) { m.SalesPrice = (decimal)dr["SalesPrice"]; } if (!string.IsNullOrEmpty(dr["RetailPrice"].ToString())) { m.RetailPrice = (decimal)dr["RetailPrice"]; } if (!string.IsNullOrEmpty(dr["BeginningInventory"].ToString())) { m.BeginningInventory = (int)dr["BeginningInventory"]; } if (!string.IsNullOrEmpty(dr["PurchaseVolume"].ToString())) { m.PurchaseVolume = (int)dr["PurchaseVolume"]; } if (!string.IsNullOrEmpty(dr["SignInVolume"].ToString())) { m.SignInVolume = (int)dr["SignInVolume"]; } if (!string.IsNullOrEmpty(dr["SalesVolume"].ToString())) { m.SalesVolume = (int)dr["SalesVolume"]; } if (!string.IsNullOrEmpty(dr["RecallVolume"].ToString())) { m.RecallVolume = (int)dr["RecallVolume"]; } if (!string.IsNullOrEmpty(dr["ReturnedVolume"].ToString())) { m.ReturnedVolume = (int)dr["ReturnedVolume"]; } if (!string.IsNullOrEmpty(dr["GiftVolume"].ToString())) { m.GiftVolume = (int)dr["GiftVolume"]; } if (!string.IsNullOrEmpty(dr["EndingInventory"].ToString())) { m.EndingInventory = (int)dr["EndingInventory"]; } if (!string.IsNullOrEmpty(dr["ComputInventory"].ToString())) { m.ComputInventory = (int)dr["ComputInventory"]; } if (!string.IsNullOrEmpty(dr["TransitInventory"].ToString())) { m.TransitInventory = (int)dr["TransitInventory"]; } if (!string.IsNullOrEmpty(dr["StaleInventory"].ToString())) { m.StaleInventory = (int)dr["StaleInventory"]; } if (!string.IsNullOrEmpty(dr["ExpiredInventory"].ToString())) { m.ExpiredInventory = (int)dr["ExpiredInventory"]; } if (!string.IsNullOrEmpty(dr["TransferInVolume"].ToString())) { m.TransferInVolume = (int)dr["TransferInVolume"]; } if (!string.IsNullOrEmpty(dr["TransferOutVolume"].ToString())) { m.TransferOutVolume = (int)dr["TransferOutVolume"]; } if (!string.IsNullOrEmpty(dr["ApproveFlag"].ToString())) { m.ApproveFlag = (int)dr["ApproveFlag"]; } if (!string.IsNullOrEmpty(dr["ApproveStaff"].ToString())) { m.ApproveStaff = (int)dr["ApproveStaff"]; } if (!string.IsNullOrEmpty(dr["InsertTime"].ToString())) { m.InsertTime = (DateTime)dr["InsertTime"]; } if (!string.IsNullOrEmpty(dr["InsertStaff"].ToString())) { m.InsertStaff = (int)dr["InsertStaff"]; } if (!string.IsNullOrEmpty(dr["UpdateTime"].ToString())) { m.UpdateTime = (DateTime)dr["UpdateTime"]; } if (!string.IsNullOrEmpty(dr["UpdateStaff"].ToString())) { m.UpdateStaff = (int)dr["UpdateStaff"]; } if (!string.IsNullOrEmpty(dr["ExtPropertys"].ToString())) { m.ExtPropertys = SpiltExtProperty(m.ModelName, (string)dr["ExtPropertys"]); } PDT_Product p = new PDT_ProductDAL().GetModel(m.Product); if (p != null) { m.ProductName = p.ShortName; m.ProductCode = p.Code; m.ConvertFactor = p.ConvertFactor; m.SubUnit = p.SubUnit; } return(m); }
public PDT_ProductBLL(string code) : base(DALClassName) { _dal = (PDT_ProductDAL)_DAL; _m = _dal.GetModel(code); }