コード例 #1
0
        public frmSaleSheetList()
        {
            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("voucher_no", "订单号", "", 120, 1, "");
            dataGrid1.AddColumn("total_amount", "订单金额", "", 90, 3, "0.00");
            dataGrid1.AddColumn("sale_man_name", "业务员", "", 80, 1, "");
            dataGrid1.AddColumn("total_amount", "单据金额", "", 90, 3, "0.00");
            dataGrid1.AddColumn("real_amount", "折后金额", "", 90, 3, "0.00");
            dataGrid1.AddColumn("pay_date", "结账日期", "", 100, 1, "yyyy-MM-dd");
            dataGrid1.AddColumn("oper_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("coin_no", "币种", "", 60, 1, "");
            dataGrid1.AddColumn("payfee_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("other3", "赠送", "", 60, 2, "{0:否,1:是}");
            dataGrid2.AddColumn("unit_no", "单位", "", 60, 2, "");
            dataGrid2.AddColumn("sale_qnty", "数量", "", 100, 3, "");
            dataGrid2.AddColumn("real_price", "实际价", "", 100, 3, "0.00");
            dataGrid2.AddColumn("sale_money", "实际金额", "", 100, 3, "0.00");
            dataGrid2.AddColumn("other5", "备注明细", "", 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();
            var             tb   = bll2.GetAllCustList();

            txt_cust_id.Bind(tb, 250, 200, "supcust_no", "supcust_no:编号:80,sup_name:名称:200", "supcust_no/sup_name->Text");
        }
コード例 #2
0
        public frmSaleInSheetList()
        {
            InitializeComponent();
            //
            Helper.GlobalData.InitForm(this);
            //
            dataGrid1.AddColumn("approve_flag", "生效", "", 60, 2, "{0:,1:√}");
            dataGrid1.AddColumn("trans_no", "业务类型", "", 90, 2, "{A:进货入库,D:退货入库,F:退货出库}");
            dataGrid1.AddColumn("sheet_no", "退货单号", "", 120, 1, "");
            dataGrid1.AddColumn("branch_name", "仓库", "", 120, 1, "");
            dataGrid1.AddColumn("sup_name", "客户名称", "", 150, 1, "");
            dataGrid1.AddColumn("total_amount", "单据总金额", "", 90, 3, "0.00");
            dataGrid1.AddColumn("deal_man_name", "业务员", "", 80, 1, "");
            dataGrid1.AddColumn("voucher_no", "销售单号", "", 120, 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("old_no", "内部单号", "", 120, 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("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_cust_id.Bind(bll2.GetAllCustList(), 250, 200, "supcust_no", "supcust_no:编号:80,sup_name:名称:200", "supcust_no/sup_name->Text");
        }
コード例 #3
0
        public frmSaleSSSheetList()
        {
            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, "");
            dataGrid1.AddColumn("other2", "备注2", "", 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();
            var             tb   = bll2.GetAllCustList();

            txt_sup_id.Bind(tb, 250, 200, "supcust_no", "supcust_no:编号:80,sup_name:名称:200", "supcust_no/sup_name->Text");
        }
コード例 #4
0
        public frmSaleSheet()
        {
            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("other3");
            tb.Columns.Add("sale_qnty", typeof(decimal));
            tb.Columns.Add("real_price", typeof(decimal));
            tb.Columns.Add("sale_money", typeof(decimal));
            tb.Columns.Add("other5");

            editGrid1.AddColumn("item_subno", "货号", "", 120, 1, "", true);
            editGrid1.AddColumn("item_name", "商品名称", "", 150, 1, "", false);
            editGrid1.AddColumn("other3", "赠送", "", 60, 2, "", false);
            editGrid1.AddColumn("unit_no", "单位", "", 60, 2, "", false);
            editGrid1.AddColumn("sale_qnty", "数量", "", 100, 3, "0.00", true);
            editGrid1.AddColumn("real_price", "实际价", "", 100, 3, "0.00", true);
            editGrid1.AddColumn("sale_money", "实际金额", "", 100, 3, "0.00", false);
            editGrid1.AddColumn("other5", "备注明细", "", 150, 1, "", true);

            editGrid1.SetTotalColumn("sale_qnty,sale_money");//合计项
            editGrid1.DataSource = tb;
            editGrid1.BindCheck("other3");
            //
            try
            {
                System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
                //

                System.Threading.Thread th = new System.Threading.Thread(() =>
                {
                    Cursor.Current = Cursors.WaitCursor;
                    Helper.GlobalData.windows.ShowLoad(this);
                    try
                    {
                        IBLL.ICommonBLL bll2 = new BLL.CommonBLL();

                        var branch = bll2.GetBranchList();
                        this.txtbranch.Invoke((MethodInvoker) delegate
                        {
                            txtbranch.Bind(branch, 300, 200, "branch_no", "branch_no:机构号:80,branch_name:机构名:140", "branch_no/branch_name->Text");
                        });

                        var sale = bll2.GetPeopleList();
                        this.txt_sale_man.Invoke((MethodInvoker) delegate
                        {
                            txt_sale_man.Bind(sale, 250, 200, "oper_id", "oper_id:职员编号:80,oper_name:姓名:80", "oper_id/oper_name->Text");
                        });

                        var cust = bll2.GetAllCustList();
                        this.txt_cust.Invoke((MethodInvoker) delegate
                        {
                            txt_cust.Bind(cust, 350, 200, "supcust_no", "supcust_no:编号:80,sup_name:名称:200", "supcust_no/sup_name->Text");
                        });

                        IBLL.IInOutBLL bll3 = new BLL.InOutBLL();
                        var order           = bll3.GetImportSSSheet();
                        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)
                    {
                        IvyBack.Helper.LogHelper.writeLog("frmSaleSheet", ex.ToString());
                        MsgForm.ShowFrom(ex);
                    }
                    Cursor.Current = Cursors.Default;
                    Helper.GlobalData.windows.CloseLoad(this);
                });
                th.Start();
            }
            catch (Exception ex)
            {
                MsgForm.ShowFrom(ex);
                Helper.LogHelper.writeLog("frmSaleSheet()", ex.ToString());
            }
            finally
            {
                System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
            }
        }
コード例 #5
0
        public frmSaleInSheet()
        {
            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("in_qty", typeof(decimal));
            tb.Columns.Add("valid_price", 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("sub_amount", "金额", "", 100, 3, "0.00", false);
            editGrid1.AddColumn("other1", "备注", "", 150, 1, "", true);
            editGrid1.AddColumn("price", "参考进价", "", 100, 3, "0.00", false);
            editGrid1.SetTotalColumn("in_qty,sub_amount");//合计项
            editGrid1.DataSource = tb;

            //
            try
            {
                System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
                //


                System.Threading.Thread th = new System.Threading.Thread(() =>
                {
                    Cursor.Current = Cursors.WaitCursor;
                    Helper.GlobalData.windows.ShowLoad(this);
                    try
                    {
                        IBLL.ICommonBLL bll2 = new BLL.CommonBLL();

                        var branch = bll2.GetBranchList();
                        this.txtbranch.Invoke((MethodInvoker) delegate
                        {
                            txtbranch.Bind(branch, 300, 200, "branch_no", "branch_no:编号:80,branch_name:名称:140", "branch_no/branch_name->Text");
                        });

                        var cust = bll2.GetAllCustList();
                        this.txt_cust.Invoke((MethodInvoker) delegate
                        {
                            txt_cust.Bind(cust, 350, 200, "supcust_no", "supcust_no:编号:80,sup_name:名称:200", "supcust_no/sup_name->Text");
                        });

                        var deal = bll2.GetPeopleList();
                        this.txt_deal_man.Invoke((MethodInvoker) delegate
                        {
                            txt_deal_man.Bind(deal, 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)
                    {
                        IvyBack.Helper.LogHelper.writeLog("frmSaleInSheet", ex.ToString());
                        MsgForm.ShowFrom(ex);
                    }
                    Cursor.Current = Cursors.Default;
                    Helper.GlobalData.windows.CloseLoad(this);
                });
                th.Start();
            }
            catch (Exception ex)
            {
                MsgForm.ShowFrom(ex);
                Helper.LogHelper.writeLog("frmSaleInSheet()", ex.ToString());
            }
            finally
            {
                System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
            }
        }