Exemplo n.º 1
0
        public static StockOut Create(Department department,IDictionary<Product,long> productList, string createId,DateTime createDate,StockDefinitionStatus definitionStatus,string description,int confirmFlag = 1)
        {
            CoralPOS.Models.StockOut stockOut = new CoralPOS.Models.StockOut
            {
                CreateDate = createDate,
                ConfirmFlg = confirmFlag,
                CreateId = createId,
                UpdateId = createId,
                UpdateDate = createDate,
                Description = description,
                Department = department,
                DefinitionStatus = definitionStatus,
                ExclusiveKey = 0,
                DelFlg = 0,
                StockOutDate = createDate,
                StockOutDetails = new List<StockOutDetail>(),

            };
            foreach (var stockInProduct in productList)
            {
                CoralPOS.Models.StockOutDetail detail = new StockOutDetail
                {
                    StockOut = stockOut,
                    CreateDate = createDate,
                    UpdateDate = createDate,
                    CreateId = createId,
                    UpdateId = createId,
                    Description = description,
                    DelFlg = 0,
                    ExclusiveKey = 0,
                    Quantity = stockInProduct.Value,
                    Product = stockInProduct.Key,
                    ProductMaster = stockInProduct.Key.ProductMaster,
                    GoodQuantity = stockInProduct.Value,
                    DefectStatusId = definitionStatus.DefectStatusId
                };
                stockOut.StockOutDetails.Add(detail);
            }
            return stockOut;
        }
Exemplo n.º 2
0
 public void Delete(StockOutDetail data)
 {
     StockOutDetailDao.Delete(data);
 }
Exemplo n.º 3
0
 public StockOutDetail Add(StockOutDetail data)
 {
     StockOutDetailDao.Add(data);
     return data;
 }
Exemplo n.º 4
0
 public void Update(StockOutDetail data)
 {
     StockOutDetailDao.Update(data);
 }
Exemplo n.º 5
0
        protected bool Equals(StockOutDetail entity)
        {
            if (entity == null) return false;
            if (!base.Equals(entity)) return false;

            return true;
        }