예제 #1
0
        public frmCusSettleList()
        {
            InitializeComponent();
            //
            Helper.GlobalData.InitForm(this);
            //
            dataGrid1.AddColumn("sheet_no", "单据号", "", 130, 1, "");
            dataGrid1.AddColumn("cus_no", "客户编号", "", 80, 1, "");
            dataGrid1.AddColumn("cus_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");
            IBLL.ICus bll = new BLL.CusBLL();
            int       tmp;

            this.myTextBox1.Bind(bll.GetDataTable("", "", 1, 1, 20000, out tmp), 300, 200, "supcust_no", "supcust_no:客户编码:100,sup_name:客户名称:150",
                                 "supcust_no/sup_name->Text");
        }
예제 #2
0
        private void LoadSup()
        {
            if (!MyLove.PermissionsBalidation(this.Text, "18"))
            {
                return;
            }
            page.PageSize = this.dgvSup.MaxDisplayRowCount();

            Thread th = new Thread(() =>
            {
                Helper.GlobalData.windows.ShowLoad(this);
                try
                {
                    Cursor.Current = Cursors.WaitCursor;
                    string cls_no  = "";

                    this.tv.Invoke((MethodInvoker) delegate
                    {
                        if (this.tv.SelectedNode != null)
                        {
                            if (this.tv.SelectedNode.Tag != null)
                            {
                                var item = (Model.bi_t_region_info) this.tv.SelectedNode.Tag;
                                cls_no   = item.region_no;
                            }
                        }
                    });

                    string SelectedNode = "";
                    string Keyword      = "";
                    int ShowStopSup     = 0;

                    this.Invoke((MethodInvoker) delegate
                    {
                        SelectedNode = this.tv.SelectedNode == null ? "" : cls_no;
                        Keyword      = this.txtKeyword.Text.Trim();
                        ShowStopSup  = this.cbShowStopSup.Checked ? 1 : 0;
                    });

                    if (_runType == 0)
                    {
                        IBLL.ISup bll = new BLL.SupBLL();
                        page          = bll.GetDataTable(
                            SelectedNode,
                            Keyword,
                            ShowStopSup,
                            page
                            );
                    }
                    else if (_runType == 1)
                    {
                        IBLL.ICus bll = new BLL.CusBLL();
                        page          = bll.GetDataTable(
                            SelectedNode,
                            Keyword,
                            ShowStopSup,
                            page
                            );
                    }

                    Conv.AddColorTable(page.tb, "display_flag");

                    this.Invoke((MethodInvoker) delegate
                    {
                        this.dgvSup.DataSource = page.tb;

                        this.lblMaxIndex.Text = page.PageMax.ToString();
                        this.lblIndex.Text    = page.PageIndex.ToString();
                    });

                    Cursor.Current = Cursors.Default;
                }
                catch (Exception ex)
                {
                    LogHelper.writeLog("LoadSup", "获取商品分类出错!");
                    MsgForm.ShowFrom(ex);
                }
                Helper.GlobalData.windows.CloseLoad(this);
            });

            th.Start();
        }