public void POPrint(bool isPrint) { try { SM_PORDER porder = this.editData as SM_PORDER; if (porder.STATUS == "A") { string poid = G.Core.GConvert.ToString(porder.POID); string condition = string.Format("poid='{0}'", poid); G.Controls.Printer.PrintHelper printobj = new G.Controls.Printer.PrintHelper(@"\Pur\PORDER.frx", new List <string>() { "Master", "Detail" }, "poprint", condition); printobj.Print(isPrint); } else { MessageBox.Show("该订单没有审核不能打印!"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void UnClosed() { try { SM_PORDER porder = this.editData as SM_PORDER; new G.BLL.ERP.Purchase.SM_PORDERLogic().UnClosed(G.AppInfo.GGlobal.User, porder); MessageBox.Show("反结清成功!"); this.Close(); } catch (Exception e) { MessageBox.Show(e.Message); } }
private void DROP_POID_RowSelect(object sender, Interface.Event.DataRowEvent e) { if (e.DataRow != null) { try { this.DROP_SUPCODE.Text = G.Core.GConvert.ToString(e.DataRow["SUPPNAME"]); this.DROP_SUPCODE.Value = G.Core.GConvert.ToString(e.DataRow["SUPCODE"]); string poid = G.Core.GConvert.ToString(e.DataRow["POID"]); G.BLL.ERP.Purchase.SM_PORDERLogic porderlogic = new G.BLL.ERP.Purchase.SM_PORDERLogic(); SM_PORDER pobj = porderlogic.ExecuteSelect(CK.K["POID"].Eq(poid), OrderBy.Parse("POID"), 0, 0)[0]; if (pobj != null) { //SM_SHIPVOUCHER shipv = this.editData as SM_SHIPVOUCHER; //shipv.SHIPVOUCHERDTL.Clear(); BindingList <SM_SHIPVOUCHERDTL> shipvd = this.gGrid1.DataSource as BindingList <SM_SHIPVOUCHERDTL>; shipvd.Clear(); foreach (SM_PORDERDTL r in pobj.PORDERDTL) { if (r.PREPURQTY > r.SHIFTQTY) { G.BLL.ERP.BaseData.DM_ITEMLogic itemlogic = new G.BLL.ERP.BaseData.DM_ITEMLogic(); DM_ITEM itemobj = itemlogic.ExecuteSelect(CK.K["ITEMCODE"].Eq(r.ITEMCODE), OrderBy.Parse("ITEMCODE"), 0, 0)[0]; SM_SHIPVOUCHERDTL shipd = new SM_SHIPVOUCHERDTL(); shipd.POLNNO = r.POLNNO; shipd.ITEMCODE = r.ITEMCODE; shipd.ITEMNAME = r.ITEMNAME; shipd.INVUNIT = r.INVUNIT; shipd.PREPURQTY = r.PREPURQTY; shipd.PRICE = r.PURPRICE; shipd.ATTRIBUTEA = r.ATTRIBUTEA; shipd.ATTRIBUTEB = r.ATTRIBUTEB; shipd.ATTRIBUTEBNAME = r.ATTRIBUTEBNAME; shipd.ATTRIBUTEC = r.ATTRIBUTEC; shipd.WRHSCODE = itemobj.WrhsCode; shipd.WRHSNAME = itemobj.WRHSNAME; shipd.LOCCODE = itemobj.LocCode; shipd.LOCNAME = itemobj.LOCNAME; shipd.UNFINISHQTY = r.PREPURQTY - r.SHIFTQTY; shipd.ISATTRIBUTEA = (bool)itemobj.IsAttributeA; shipd.ISATTRIBUTEB = (bool)itemobj.IsAttributeB; shipd.ISATTRIBUTEC = (bool)itemobj.IsAttributeC; shipvd.Add(shipd); } } } } catch (Exception ex) { MessageBox.Show(ex.Message); } } gGrid1.Refresh(); }
public void GYS() { try { SM_PORDER porder = this.editData as SM_PORDER; if (porder.SUPCODE != "") { string supcode = G.Core.GConvert.ToString(porder.SUPCODE); G.BLL.ERP.BaseData.DM_SUPPLIERLogic logic = new G.BLL.ERP.BaseData.DM_SUPPLIERLogic(); DM_SUPPLIER obj = logic.ExecuteSelect(CK.K["SUPPCODE"].Eq(supcode), OrderBy.Parse("SUPPCODE"), 0, 0)[0]; DM_SUPPLIEREDIT supplieredit = new DM_SUPPLIEREDIT(); supplieredit.CurEditStatus = EditorStatus.Look; supplieredit.SetData(obj); supplieredit.ShowDialog(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void gGrid1_AfterEdit(object sender, C1.Win.C1FlexGrid.RowColEventArgs e) { if (e.Col == 3 || e.Col == 4) { SM_PORDERDTL dtl = gGrid1.GetCurSelect <SM_PORDERDTL>(); dtl.PORTOTTAL = dtl.PURPRICE * dtl.PREPURQTY; SM_PORDER porder = this.editData as SM_PORDER; decimal total = 0; foreach (SM_PORDERDTL d in porder.PORDERDTL) { total += d.PORTOTTAL; } porder.TOTALAMT = total; TXT_TOTALAMT.SetValue(total); this.gGrid1.Refresh(); } if (e.Col == 5) { SM_PORDERDTL dtl = gGrid1.GetCurSelect <SM_PORDERDTL>(); if (dtl.PREPURQTY == 0) { dtl.PORTOTTAL = 0; } else { dtl.PURPRICE = dtl.PORTOTTAL / dtl.PREPURQTY; } SM_PORDER porder = this.editData as SM_PORDER; decimal total = 0; foreach (SM_PORDERDTL d in porder.PORDERDTL) { total += d.PORTOTTAL; } porder.TOTALAMT = total; TXT_TOTALAMT.SetValue(total); this.gGrid1.Refresh(); } }