Exemplo n.º 1
0
        private void AddProduceRecord(string containerID, string comment)
        {
            MesDBAccess.BLL.ProductOnlineBll productOnlineBll = new MesDBAccess.BLL.ProductOnlineBll();
            MesDBAccess.BLL.ProduceRecordBll productRecordBll = new MesDBAccess.BLL.ProduceRecordBll();
            //throw new NotImplementedException();
            string strSql = string.Format(@"palletID='{0}' and palletBinded=1 ", containerID);
            List <MesDBAccess.Model.ProductOnlineModel> products = productOnlineBll.GetModelList(strSql);

            // string nextStepID = GetNextStepID(containerID);
            MesDBAccess.Model.ProduceRecordModel record = new MesDBAccess.Model.ProduceRecordModel();
            record.recordID    = System.Guid.NewGuid().ToString("N");
            record.productID   = containerID;
            record.recordTime  = System.DateTime.Now;
            record.productCata = "料框";
            record.stationID   = "";
            record.tag1        = comment;
            productRecordBll.Add(record);
            if (products != null && products.Count() > 0)
            {
                foreach (MesDBAccess.Model.ProductOnlineModel product in products)
                {
                    record             = new MesDBAccess.Model.ProduceRecordModel();
                    record.recordID    = System.Guid.NewGuid().ToString("N");
                    record.productID   = product.productID;
                    record.productCata = product.productCata;
                    record.recordTime  = System.DateTime.Now;
                    record.stationID   = "";
                    record.checkResult = product.checkResult;
                    record.tag1        = comment;
                    record.tag2        = product.palletID;
                    productRecordBll.Add(record);
                }
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(MesDBAccess.Model.ProduceRecordModel model)
 {
     return(dal.Update(model));
 }
Exemplo n.º 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(MesDBAccess.Model.ProduceRecordModel model)
 {
     return(dal.Add(model));
 }