public bool Delete(string documentNo, string productCode, DbTransaction parentTransaction) { var SIDetailItem = new SIDetail { DocumentNo = documentNo, ProductCode = productCode }; return(Delete(SIDetailItem, parentTransaction)); }
private void Do() { Query q1 = new Query(typeof(FNCART_CTLEntity)); q1.AddAttribute(FNCART_CTLEntity.__STNO); q1.AddAttribute(FNCART_CTLEntity.__SECTION); q1.AddAttribute(FNCART_CTLEntity.__GROUPNO); Condition c1 = q1.GetQueryCondition(); c1.AddEqualTo(FNCART_CTLEntity.__REGISTER_FLG, "1"); q1.GroupBy(FNCART_CTLEntity.__STNO); q1.GroupBy(FNCART_CTLEntity.__GROUPNO); q1.GroupBy(FNCART_CTLEntity.__SECTION); Query q2 = new Query(typeof(FNRETRIEVAL_STEntity)); q2.AddAttribute(FNRETRIEVAL_STEntity.__RETRIEVAL_STATION); q2.AddAttribute(FNRETRIEVAL_STEntity.__CART_TICKET_PRINTFLG); q2.AddAttribute(FNRETRIEVAL_STEntity.__PRINTER_NO_CART); q2.GroupBy(FNRETRIEVAL_STEntity.__RETRIEVAL_STATION); q2.GroupBy(FNRETRIEVAL_STEntity.__PRINTER_NO_CART); q2.GroupBy(FNRETRIEVAL_STEntity.__CART_TICKET_PRINTFLG); q1.AddJoinQuery(FNCART_CTLEntity.__STNO, q2, FNRETRIEVAL_STEntity.__UNIT_STNO); q1.OrderBy(FNCART_CTLEntity.__STNO); q1.OrderBy(FNCART_CTLEntity.__GROUPNO); DataTable dt = q1.Execute(); //sql1 if (dt != null && dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { DataRow dr = dt.Rows[i]; string printflag = dr[FNRETRIEVAL_STEntity.__CART_TICKET_PRINTFLG].ToString(); decimal printNo = Convert.ToDecimal(dr[FNRETRIEVAL_STEntity.__PRINTER_NO_CART]); string printName = GetPrintName(printNo); string retrievalStation = dr[FNRETRIEVAL_STEntity.__RETRIEVAL_STATION].ToString(); string groupNo = dr[FNCART_CTLEntity.__GROUPNO].ToString(); string section = dr[FNCART_CTLEntity.__SECTION].ToString(); try { if (printflag == "1") //要打印 { DataTable dt1 = GetData(section, groupNo); if (dt1 != null && dt1.Rows.Count > 0) { if (retrievalStation == "24") //组立 { AssemblyHead head = new AssemblyHead(); head.Section = section; List <AssemblyDetail> details = new List <AssemblyDetail>(); for (int j = 0; j < dt1.Rows.Count; j++) { DataRow dr1 = dt1.Rows[j]; AssemblyDetail detail = new AssemblyDetail(); detail.BucketNo = dr1[FNCART_CTLEntity.__BUCKET_NO].ToString(); detail.ColorCode = dr1[FNCART_CTLEntity.__COLOR_CODE].ToString(); detail.ItemCode = dr1[FNCART_CTLEntity.__ITEM_CODE].ToString(); detail.ItemName = dr1[FMZKEYEntity.__ZKNAME1].ToString(); detail.Qty = dr1[FNCART_CTLEntity.__QTY].ToString(); detail.Weight = dr1[FNCART_CTLEntity.__WEIGHT].ToString(); details.Add(detail); } pc.DoPrint(printName, head, details); } else if (retrievalStation == "11" || retrievalStation == "21") //SI { SIHead head = new SIHead(); head.Section = section; List <SIDetail> details = new List <SIDetail>(); for (int j = 0; j < dt1.Rows.Count; j++) { DataRow dr1 = dt1.Rows[j]; SIDetail detail = new SIDetail(); detail.BucketNo = dr1[FNCART_CTLEntity.__BUCKET_NO].ToString(); detail.Line = dr1[FNCART_CTLEntity.__LINE].ToString(); detail.ItemCode = dr1[FNCART_CTLEntity.__ITEM_CODE].ToString(); detail.ItemName = dr1[FMZKEYEntity.__ZKNAME1].ToString(); detail.Qty = dr1[FNCART_CTLEntity.__QTY].ToString(); detail.Weight = dr1[FNCART_CTLEntity.__WEIGHT].ToString(); details.Add(detail); } pc.DoPrint(printName, head, details); } } } } catch (Exception ex) { WriteLog(ex.Message); } //update UpdateCriteria uc = new UpdateCriteria(typeof(FNCART_CTLEntity)); Condition c = uc.GetNewCondition(); c.AddEqualTo(FNCART_CTLEntity.__SECTION, section); c.AddEqualTo(FNCART_CTLEntity.__GROUPNO, groupNo); c.AddEqualTo(FNCART_CTLEntity.__REGISTER_FLG, "1"); uc.AddAttributeForUpdate(FNCART_CTLEntity.__REGISTER_FLG, "3"); uc.Perform(); } } }
public SIDetail GetSIDetail(SIDetail item) { return((SIDetail)sidetailDAL.GetItem <SIDetail>(item)); }
public bool DeleteSIDetail(SIDetail item) { return(sidetailDAL.Delete(item)); }
public bool SaveSIDetail(SIDetail newItem) { return(sidetailDAL.Save(newItem)); }