public frmCGOutSheetList() { InitializeComponent(); // Helper.GlobalData.InitForm(this); // dataGrid1.AddColumn("approve_flag", "生效", "", 60, 2, "{0:,1:√}"); dataGrid1.AddColumn("trans_no", "单据类型", "", 90, 2, "{A:进货入库,D:退货入库,F:退货出库}"); dataGrid1.AddColumn("sale_no", "经销方式", "", 90, 2, "{A:购销,B:代销,C:联营,E:联营进货,Z:租赁}"); dataGrid1.AddColumn("sheet_no", "退货单号", "", 120, 1, ""); dataGrid1.AddColumn("branch_name", "仓库", "", 120, 1, ""); dataGrid1.AddColumn("supcust_no", "供应商", "", 80, 2, ""); dataGrid1.AddColumn("sup_name", "货商名称", "", 150, 1, ""); dataGrid1.AddColumn("total_amount", "单据总金额", "", 90, 3, "0.00"); dataGrid1.AddColumn("deal_man_name", "经办人", "", 80, 1, ""); dataGrid1.AddColumn("old_no", "内部单号", "", 120, 1, ""); dataGrid1.AddColumn("voucher_no", "入库单号", "", 90, 1, ""); dataGrid1.AddColumn("oper_name", "操作员", "", 90, 1, ""); dataGrid1.AddColumn("oper_date", "操作日期", "", 100, 1, "yyyy-MM-dd"); dataGrid1.AddColumn("approve_man_name", "审核人", "", 100, 1, ""); dataGrid1.AddColumn("approve_date", "审核日期", "", 100, 1, "yyyy-MM-dd"); dataGrid1.AddColumn("pay_date", "限收款日", "", 100, 1, "yyyy-MM-dd"); dataGrid1.AddColumn("other1", "备注1", "", 200, 1, ""); dataGrid1.AddColumn("other3", "备注", "", 200, 1, ""); this.dataGrid1.DataSource = new DataTable(); // dataGrid2.AddColumn("item_subno", "货号", "", 120, 1, ""); dataGrid2.AddColumn("item_name", "商品名称", "", 150, 1, ""); dataGrid2.AddColumn("unit_no", "单位", "", 60, 2, "{0:否,1:是}"); dataGrid2.AddColumn("item_size", "规格", "", 80, 2, ""); dataGrid2.AddColumn("in_qty", "数量", "", 100, 3, ""); dataGrid2.AddColumn("valid_price", "单价", "", 100, 3, "0.00"); //dataGrid2.AddColumn("discount", "折扣", "", 100, 3, "0.00"); dataGrid2.AddColumn("sub_amount", "金额", "", 100, 3, "0.00"); //dataGrid2.AddColumn("", "特价", "", 100, 3, "0.00"); dataGrid2.AddColumn("other1", "备注", "", 200, 1, ""); //dataGrid2.AddColumn("", "生产批号", "", 200, 1, ""); //dataGrid2.AddColumn("valid_date", "有效期", "", 100, 1, "yyyy-MM-dd"); //dataGrid2.AddColumn("", "库位", "", 120, 1, ""); dataGrid2.AddColumn("price", "参考进价", "", 100, 3, "0.00"); this.dataGrid2.DataSource = new DataTable(); // this.dateTextBox1.Text = System.DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"); this.dateTextBox2.Text = System.DateTime.Now.ToString("yyyy-MM-dd"); IBLL.ICommonBLL bll2 = new BLL.CommonBLL(); txt_sup_id.Bind(bll2.GetAllSupList(), 250, 200, "supcust_no", "supcust_no:编号:80,sup_name:名称:200", "supcust_no/sup_name->Text"); }
public frmCGOrderList() { InitializeComponent(); // Helper.GlobalData.InitForm(this); // dataGrid1.AddColumn("approve_flag", "生效", "", 60, 2, "{0:,1:√}"); dataGrid1.AddColumn("sheet_no", "单据号", "", 120, 1, ""); dataGrid1.AddColumn("branch_name", "仓库", "", 120, 1, ""); dataGrid1.AddColumn("sup_name", "供应商", "", 120, 1, ""); dataGrid1.AddColumn("total_amount", "金额", "", 90, 3, "0.00"); dataGrid1.AddColumn("order_man_name", "业务员", "", 80, 1, ""); dataGrid1.AddColumn("oper_date", "订单日期", "", 100, 1, "yyyy-MM-dd"); dataGrid1.AddColumn("valid_date", "有效期", "", 100, 1, "yyyy-MM-dd"); dataGrid1.AddColumn("oper_name", "操作员", "", 90, 1, ""); dataGrid1.AddColumn("approve_date", "审核日期", "", 100, 1, "yyyy-MM-dd"); dataGrid1.AddColumn("approve_man_name", "审核人", "", 100, 1, ""); dataGrid1.AddColumn("memo", "备注", "", 200, 1, ""); this.dataGrid1.DataSource = new DataTable(); // dataGrid2.AddColumn("item_subno", "货号", "", 120, 1, ""); dataGrid2.AddColumn("barcode", "条码", "", 120, 1, ""); dataGrid2.AddColumn("item_name", "商品名称", "", 150, 1, ""); dataGrid2.AddColumn("unit_no", "单位", "", 60, 2, ""); dataGrid2.AddColumn("item_size", "规格", "", 60, 2, ""); dataGrid2.AddColumn("order_qnty", "数量", "", 100, 3, ""); dataGrid2.AddColumn("in_price", "价格", "", 100, 3, "0.00"); dataGrid2.AddColumn("sub_amount", "金额", "", 100, 3, "0.00"); dataGrid2.AddColumn("other1", "备注明细", "", 200, 1, ""); this.dataGrid2.DataSource = new DataTable(); // this.dateTextBox1.Text = System.DateTime.Now.AddDays(-7).ToString("yyyy-MM-dd"); this.dateTextBox2.Text = System.DateTime.Now.ToString("yyyy-MM-dd"); IBLL.ICommonBLL bll2 = new BLL.CommonBLL(); txt_sup_id.Bind(bll2.GetAllSupList(), 250, 200, "supcust_no", "supcust_no:编号:80,sup_name:名称:200", "supcust_no/sup_name->Text"); }
public frmCGOrder() { InitializeComponent(); // Helper.GlobalData.InitForm(this); // var tb = new DataTable(); tb.Columns.Add("item_no"); tb.Columns.Add("item_subno"); tb.Columns.Add("barcode"); tb.Columns.Add("item_name"); tb.Columns.Add("unit_no"); tb.Columns.Add("item_size"); tb.Columns.Add("order_qnty", typeof(decimal)); tb.Columns.Add("in_price", typeof(decimal)); tb.Columns.Add("discount", typeof(decimal)); tb.Columns.Add("sub_amount", typeof(decimal)); tb.Columns.Add("other1"); editGrid1.AddColumn("item_subno", "货号", "", 120, 1, "", true); editGrid1.AddColumn("item_name", "商品名称", "", 150, 1, "", false); editGrid1.AddColumn("unit_no", "单位", "", 60, 2, "", false); editGrid1.AddColumn("item_size", "规格", "", 60, 2, "", false); editGrid1.AddColumn("order_qnty", "总数量", "", 100, 3, "0.00", true); editGrid1.AddColumn("in_price", "单价", "", 100, 3, "0.00", true); editGrid1.AddColumn("discount", "折扣", "", 100, 3, "0.00", false); editGrid1.AddColumn("sub_amount", "金额", "", 100, 3, "0.00", true); editGrid1.AddColumn("other1", "备注", "", 150, 1, "", true); editGrid1.SetTotalColumn("order_qnty,sub_amount");//合计项 editGrid1.DataSource = tb; editGrid1.IsShowIco = true; // try { System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor; // Thread th = new Thread(() => { Helper.GlobalData.windows.ShowLoad(this); try { IBLL.ICommonBLL bll2 = new BLL.CommonBLL(); var branch_tb = bll2.GetBranchList(); this.txtbranch.Invoke((MethodInvoker) delegate { txtbranch.Bind(branch_tb, 300, 200, "branch_no", "branch_no:编号:80,branch_name:名称:140", "branch_no/branch_name->Text"); }); var sup_tb = bll2.GetAllSupList(); this.txt_sup.Invoke((MethodInvoker) delegate { txt_sup.Bind(sup_tb, 350, 200, "supcust_no", "supcust_no:编号:80,sup_name:名称:200", "supcust_no/sup_name->Text"); }); var deal_tb = bll2.GetPeopleList(); this.txt_order_man.Invoke((MethodInvoker) delegate { txt_order_man.Bind(deal_tb, 250, 200, "oper_id", "oper_id:编号:80,oper_name:姓名:100", "oper_id/oper_name->Text"); }); this.Invoke((MethodInvoker) delegate { IOrder ins = this; ins.Add(); }); } catch (Exception ex) { LogHelper.writeLog("frmCGOrder", ex.ToString()); MsgForm.ShowFrom(ex); } Helper.GlobalData.windows.CloseLoad(this); }); th.Start(); } catch (Exception ex) { MsgForm.ShowFrom(ex); Helper.LogHelper.writeLog("frmCGOrder()", ex.ToString()); } finally { System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default; } }
public frmCGInSheet() { InitializeComponent(); // Helper.GlobalData.InitForm(this); // var tb = new DataTable(); tb.Columns.Add("item_no"); tb.Columns.Add("item_subno"); tb.Columns.Add("barcode"); tb.Columns.Add("item_name"); tb.Columns.Add("unit_no"); tb.Columns.Add("item_size"); tb.Columns.Add("other3"); tb.Columns.Add("in_qty", typeof(decimal)); tb.Columns.Add("valid_price", typeof(decimal)); tb.Columns.Add("discount", typeof(decimal)); tb.Columns.Add("sub_amount", typeof(decimal)); tb.Columns.Add("other1"); tb.Columns.Add("valid_date", typeof(DateTime)); tb.Columns.Add("price", typeof(decimal));//参考进价 editGrid1.AddColumn("item_subno", "货号", "", 100, 1, "", true); editGrid1.AddColumn("item_name", "商品名称", "", 150, 1, "", false); editGrid1.AddColumn("unit_no", "单位", "", 60, 2, "", false); editGrid1.AddColumn("item_size", "规格", "", 80, 1, "", false); editGrid1.AddColumn("in_qty", "数量", "", 100, 3, "0.00", true); editGrid1.AddColumn("valid_price", "单价", "", 100, 3, "0.00", true); editGrid1.AddColumn("discount", "折扣", "", 100, 3, "0.00", true); editGrid1.AddColumn("sub_amount", "金额", "", 100, 3, "0.00", false); editGrid1.AddColumn("other1", "备注", "", 150, 1, "", true); editGrid1.AddColumn("valid_date", "有效期", "", 100, 1, "yyyy-MM-dd", true); editGrid1.AddColumn("price", "参考进价", "", 100, 3, "0.00", false); editGrid1.SetTotalColumn("in_qty,sub_amount");//合计项 editGrid1.DataSource = tb; editGrid1.IsShowIco = true; // try { System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor; // Thread th = new Thread(() => { Helper.GlobalData.windows.ShowLoad(this); try { IBLL.ICommonBLL bll2 = new BLL.CommonBLL(); var branch_tb = bll2.GetBranchList(); this.txtbranch.Invoke((MethodInvoker) delegate { txtbranch.Bind(branch_tb, 300, 200, "branch_no", "branch_no:编号:80,branch_name:名称:140", "branch_no/branch_name->Text"); }); DataTable dt2 = new DataTable(); dt2.Columns.Add("sale_no"); dt2.Columns.Add("sale_name"); dt2.Rows.Add("A", "购销"); dt2.Rows.Add("B", "代销"); dt2.Rows.Add("C", "联营"); dt2.Rows.Add("E", "联营进货"); dt2.Rows.Add("Z", "租赁"); this.txt_sale_no.Invoke((MethodInvoker) delegate { txt_sale_no.Bind(dt2, 250, 200, "sale_no", "sale_no:编码:80,sale_name:代销方式:100", "sale_no/sale_name->Text"); }); var sup_tb = bll2.GetAllSupList(); this.txt_sup.Invoke((MethodInvoker) delegate { txt_sup.Bind(sup_tb, 350, 200, "supcust_no", "supcust_no:编号:80,sup_name:名称:200", "supcust_no/sup_name->Text"); }); var deal_tb = bll2.GetPeopleList(); this.txt_deal_man.Invoke((MethodInvoker) delegate { txt_deal_man.Bind(deal_tb, 250, 200, "oper_id", "oper_id:编号:80,oper_name:姓名:100", "oper_id/oper_name->Text"); }); IBLL.IInOutBLL bll3 = new BLL.InOutBLL(); var order = bll3.GetImportCGOrder(); this.txt_voucher_no.Invoke((MethodInvoker) delegate { this.txt_voucher_no.Bind(order, 350, 200, "sheet_no", "sheet_no:单据号:110,supcust:供应商:100,branch:仓库:100,oper_date:日期:150", "sheet_no->Text"); }); this.Invoke((MethodInvoker) delegate { IOrder ins = this; ins.Add(); }); } catch (Exception ex) { LogHelper.writeLog("frmCGInSheet", ex.ToString()); MsgForm.ShowFrom(ex); } Helper.GlobalData.windows.CloseLoad(this); }); th.Start(); } catch (Exception ex) { MsgForm.ShowFrom(ex); Helper.LogHelper.writeLog("frmCGInSheet()", ex.ToString()); } finally { System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default; } }