예제 #1
0
 public frmSupFYList()
 {
     InitializeComponent();
     //
     Helper.GlobalData.InitForm(this);
     //
     dataGrid1.AddColumn("sheet_no", "费用单号", "", 130, 1, "");
     dataGrid1.AddColumn("sup_no", "货商编号", "", 80, 1, "");
     dataGrid1.AddColumn("sup_name", "货商名称", "", 150, 1, "");
     dataGrid1.AddColumn("branch_no_a", "发生机构", "", 130, 1, "");
     dataGrid1.AddColumn("old_no", "原始单号", "", 130, 1, "");
     dataGrid1.AddColumn("sale_man_a", "经办人", "", 100, 1, "");
     dataGrid1.AddColumn("approve_man_a", "审核人", "", 110, 1, "");
     dataGrid1.AddColumn("approve_date", "审核日期", "", 100, 1, "yyyy-MM-dd");
     dataGrid1.AddColumn("oper_id_a", "操作员", "", 100, 1, "");
     dataGrid1.AddColumn("oper_date", "操作日期", "", 100, 1, "yyyy-MM-dd");
     dataGrid1.DataSource = new DataTable();
     //
     dataGrid2.AddColumn("kk_no", "费用代码", "", 90, 1, "");
     dataGrid2.AddColumn("kk_name", "费用名称", "", 150, 1, "");
     dataGrid2.AddColumn("kk_cash", "费用(金额)", "", 100, 3, "0.00");
     dataGrid2.AddColumn("pay_kind", "应付增减", "", 80, 2, "{0:-,1:+}");
     dataGrid2.AddColumn("other1", "备注", "", 150, 1, "");
     dataGrid2.DataSource = new DataTable();
     //
     this.dateTextBox1.Text = System.DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd");
     this.dateTextBox2.Text = System.DateTime.Now.ToString("yyyy-MM-dd");
     BLL.SupFY bll = new BLL.SupFY();
     this.myTextBox1.Bind(bll.GetSupList(), 300, 200, "supcust_no", "supcust_no:货商编码:100,sup_name:货商名称:150",
                          "supcust_no/sup_name->Text");
 }
예제 #2
0
 public frmSupSettleList()
 {
     InitializeComponent();
     //
     Helper.GlobalData.InitForm(this);
     //
     dataGrid1.AddColumn("sheet_no", "单据号", "", 130, 1, "");
     dataGrid1.AddColumn("sup_no", "货商编号", "", 80, 1, "");
     dataGrid1.AddColumn("sup_name", "货商名称", "", 150, 1, "");
     dataGrid1.AddColumn("total_amount", "结算金额", "", 90, 3, "0.00");
     dataGrid1.AddColumn("free_money", "免付金额", "", 90, 3, "0.00");
     dataGrid1.AddColumn("pay_way_a", "付款方式", "", 120, 1, "");
     dataGrid1.AddColumn("branch_no_a", "发生机构", "", 130, 1, "");
     dataGrid1.AddColumn("deal_man_a", "经办人", "", 100, 1, "");
     dataGrid1.AddColumn("approve_man_a", "审核人", "", 110, 1, "");
     dataGrid1.AddColumn("approve_date", "审核日期", "", 100, 1, "yyyy-MM-dd");
     dataGrid1.AddColumn("oper_id_a", "操作员", "", 100, 1, "");
     dataGrid1.AddColumn("oper_date", "操作日期", "", 100, 1, "yyyy-MM-dd");
     dataGrid1.DataSource = new DataTable();
     dataGrid1.SetTotalColumn("total_amount,free_money");
     //
     dataGrid2.AddColumn("select_flag", "核销", "", 50, 2, "{0:,1:√}");
     dataGrid2.AddColumn("path", "方向", "", 50, 2, "{0:-,1:+}");
     dataGrid2.AddColumn("voucher_no", "业务单号", "", 150, 1, "");
     dataGrid2.AddColumn("voucher_first", "业务类型", "", 90, 2, IvyTransFunction.tran_no_str);
     dataGrid2.AddColumn("sheet_amount", "单据金额", "", 100, 3, "0.00");
     dataGrid2.AddColumn("paid_amount", "已付金额", "", 100, 3, "0.00");
     dataGrid2.AddColumn("paid_free", "已免付金额", "", 100, 3, "0.00");
     dataGrid2.AddColumn("yf_amount", "应付金额", "", 100, 3, "0.00");
     dataGrid2.AddColumn("pay_amount", "本次付款金额", "", 120, 3, "0.00");
     dataGrid2.AddColumn("pay_free", "免付金额", "", 100, 3, "0.00");
     dataGrid2.AddColumn("memo", "备注", "", 180, 1, "");
     dataGrid2.AddColumn("voucher_type", "业务描述", "", 100, 1, "");
     dataGrid2.DataSource = new DataTable();
     //
     this.dateTextBox1.Text = System.DateTime.Now.AddDays(-30).ToString("yyyy-MM-dd");
     this.dateTextBox2.Text = System.DateTime.Now.ToString("yyyy-MM-dd");
     BLL.SupFY bll = new BLL.SupFY();
     this.myTextBox1.Bind(bll.GetSupList(), 300, 200, "supcust_no", "supcust_no:货商编码:100,sup_name:货商名称:150",
                          "supcust_no/sup_name->Text");
 }
예제 #3
0
        public frmSupSettle()
        {
            InitializeComponent();
            //
            Helper.GlobalData.InitForm(this);
            //
            var tb = new DataTable();

            tb.Columns.Add("select_flag");
            tb.Columns.Add("path");
            tb.Columns.Add("voucher_no");
            tb.Columns.Add("voucher_first");
            tb.Columns.Add("sheet_amount", typeof(decimal));
            tb.Columns.Add("paid_amount", typeof(decimal));
            tb.Columns.Add("paid_free", typeof(decimal));
            tb.Columns.Add("yf_amount", typeof(decimal));
            tb.Columns.Add("pay_amount", typeof(decimal));
            tb.Columns.Add("pay_free", typeof(decimal));
            tb.Columns.Add("pay_date", typeof(DateTime));
            tb.Columns.Add("memo");
            tb.Columns.Add("voucher_type");

            editGrid1.AddColumn("select_flag", "核销", "", 50, 2, "", false);
            editGrid1.AddColumn("path", "方向", "", 50, 2, "{-1:-,1:+}", false);
            editGrid1.AddColumn("voucher_no", "业务单号", "", 150, 1, "", false);
            editGrid1.AddColumn("voucher_first", "业务类型", "", 90, 2, IvyTransFunction.tran_no_str, false);
            editGrid1.AddColumn("sheet_amount", "单据金额", "", 100, 3, "0.00", false);
            editGrid1.AddColumn("paid_amount", "已付金额", "", 100, 3, "0.00", false);
            editGrid1.AddColumn("paid_free", "已免付金额", "", 100, 3, "0.00", false);
            editGrid1.AddColumn("yf_amount", "应付金额", "", 100, 3, "0.00", false);
            editGrid1.AddColumn("pay_amount", "本次付款金额", "", 120, 3, "0.00", true);
            editGrid1.AddColumn("pay_free", "免付金额", "", 100, 3, "0.00", true);
            editGrid1.AddColumn("pay_date", "限付日期", "", 100, 3, "yyyy-MM-dd", false);
            editGrid1.AddColumn("memo", "备注", "", 180, 1, "", true);
            editGrid1.AddColumn("voucher_type", "业务描述", "", 100, 1, "", false);

            editGrid1.SetTotalColumn("pay_amount,pay_free");
            editGrid1.BindCheck("select_flag");
            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
                    {
                        BLL.SupFY bll = new BLL.SupFY();

                        var sup = bll.GetSupList();
                        this.txtsup.Invoke((MethodInvoker) delegate
                        {
                            this.txtsup.Bind(sup, 300, 200, "supcust_no", "supcust_no:货商编码:100,sup_name:货商名称:150", "supcust_no/sup_name->Text");
                        });

                        IBLL.IPayment paymentBLL = new BLL.PaymentBLL();
                        var pay_way = paymentBLL.GetAllList();
                        this.txtpay_way.Invoke((MethodInvoker) delegate
                        {
                            txtpay_way.Bind(pay_way, 300, 200, "pay_way", "pay_way:付款代码:100,pay_name:付款方式:100", "pay_way/pay_name->Text");
                            txtpay_way.GetDefaultValue();
                        });

                        var visa = bll.GetBankList();
                        this.txtvisa.Invoke((MethodInvoker) delegate
                        {
                            txtvisa.Bind(visa, 300, 200, "visa_id", "visa_id:编号:100,visa_nm:名称:130", "visa_id/visa_nm->Text");
                            txtvisa.GetDefaultValue();
                        });

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

                        IBLL.IPeople peopleBLL = new BLL.PeopleBLL();
                        int tmp;
                        var people = peopleBLL.GetDataTable("", "", 1, 1, 20000, out tmp);

                        this.txtpeople.Invoke((MethodInvoker) delegate
                        {
                            txtpeople.Bind(people, 250, 200, "oper_id", "oper_id:职员编号:80,oper_name:姓名:80", "oper_id/oper_name->Text");
                            txtpeople.GetDefaultValue();
                        });

                        this.Invoke((MethodInvoker) delegate
                        {
                            IOrder ins = this;
                            ins.Add();
                        });
                    }
                    catch (Exception ex)
                    {
                        IvyBack.Helper.LogHelper.writeLog("frmSupSettle", ex.ToString());
                        MsgForm.ShowFrom(ex);
                    }
                    Cursor.Current = Cursors.Default;
                    Helper.GlobalData.windows.CloseLoad(this);
                });
                th.Start();
            }
            catch (Exception ex)
            {
                MsgForm.ShowFrom(ex);
            }
            finally
            {
                System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
            }
        }
예제 #4
0
        public frmSupFY()
        {
            InitializeComponent();
            //
            Helper.GlobalData.InitForm(this);
            //
            var tb = new DataTable();

            tb.Columns.Add("kk_no");
            tb.Columns.Add("kk_name");
            tb.Columns.Add("kk_cash");
            tb.Columns.Add("pay_kind");
            tb.Columns.Add("other1");

            editGrid1.AddColumn("kk_no", "费用代码", "", 90, 1, "", true);
            editGrid1.AddColumn("kk_name", "费用名称", "", 140, 1, "", false);
            editGrid1.AddColumn("kk_cash", "费用(金额)", "", 100, 3, "0.00", true);
            editGrid1.AddColumn("pay_kind", "应收增减", "", 75, 2, "{0:-,1:+}", false);
            editGrid1.AddColumn("other1", "备注", "", 250, 1, "", true);
            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
                    {
                        BLL.SupFY bll = new BLL.SupFY();

                        var editgrid = bll.GetSZList();
                        this.editGrid1.Invoke((MethodInvoker) delegate
                        {
                            var edgrid = editgrid.Copy();
                            foreach (DataRow dr in edgrid.Rows)
                            {
                                dr["pay_kind"] = dr["pay_kind"].ToInt32() == 0 ? "-" : "+";
                            }
                            editGrid1.Bind("kk_no", edgrid, 400, 200, "pay_way", "pay_way:费用代码:80,pay_name:费用名称:150,pay_kind:方向:60", "pay_way->kk_no,pay_name->kk_name,pay_kind->pay_kind");
                        });

                        var cus = bll.GetSupList();
                        this.txtcus.Invoke((MethodInvoker) delegate
                        {
                            this.txtcus.Bind(cus, 300, 200, "supcust_no", "supcust_no:客户编码:100,sup_name:客户名称:150", "supcust_no/sup_name->Text");
                        });

                        var visa = bll.GetBankList();
                        this.txtvisa.Invoke((MethodInvoker) delegate
                        {
                            txtvisa.Bind(visa, 300, 200, "visa_id", "visa_id:编号:100,visa_nm:名称:130", "visa_id/visa_nm->Text");
                            txtvisa.GetDefaultValue();
                        });

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

                        IBLL.IPeople peopleBLL = new BLL.PeopleBLL();
                        int tmp;
                        var people = peopleBLL.GetDataTable("", "", 1, 1, 20000, out tmp);

                        this.txtpeople.Invoke((MethodInvoker) delegate
                        {
                            txtpeople.Bind(people, 250, 200, "oper_id", "oper_id:职员编号:80,oper_name:姓名:80", "oper_id/oper_name->Text");
                            txtpeople.GetDefaultValue();
                        });

                        this.Invoke((MethodInvoker) delegate
                        {
                            IOrder ins = this;
                            ins.Add();
                        });
                    }
                    catch (Exception ex)
                    {
                        IvyBack.Helper.LogHelper.writeLog("frmSupFY", ex.ToString());
                        MsgForm.ShowFrom(ex);
                    }
                    Cursor.Current = Cursors.Default;
                    Helper.GlobalData.windows.CloseLoad(this);
                });
                th.Start();
            }
            catch (Exception ex)
            {
                MsgForm.ShowFrom(ex);
            }
            finally
            {
                System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
            }
        }