Пример #1
0
        private void tsbDel_Click(object sender, EventArgs e)
        {
            try
            {
                if (!MyLove.PermissionsBalidation(this.Text, "02"))
                {
                    return;
                }

                DataRow dr = this.dgvBranch.CurrentRow();
                if (dr == null)
                {
                    return;
                }

                if (YesNoForm.ShowFrom("确认要删除吗?") == DialogResult.Yes)
                {
                    IBLL.IBranch bll = new BLL.BranchBLL();
                    var          b   = DB.ReflectionHelper.DataRowToModel <bi_t_branch_info>(dr);
                    bll.Del(b);
                    LoadTv();
                }
            }
            catch (Exception ex)
            {
                MsgForm.ShowFrom(ex);
            }
        }
        private void txt_branch_Leave(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(this.txt_branch.Text.Trim()))
            {
                errMsg = "请输入仓库";
                return;
            }
            {
                errMsg = "";
            }
            string branch = this.txt_branch.Text.Trim();

            IBLL.IBranch     bll         = new BLL.BranchBLL();
            bi_t_branch_info branch_Info = new bi_t_branch_info()
            {
                branch_no = branch
            };

            branch_Info = bll.GetItem(branch_Info);

            if (branch_Info == null || string.IsNullOrEmpty(branch_Info.branch_no))
            {
                frmSelect frm = new frmSelect("5", branch);
                frm.ShowDialog();
                if (frm.item_no != "")
                {
                    if (frm.item_no != "")
                    {
                        branch_Info.branch_no = frm.item_no;
                        branch_Info           = bll.GetItem(branch_Info);
                    }
                }
            }

            this.branch = branch_Info;
            if (branch_Info == null || string.IsNullOrEmpty(branch_Info.branch_no))
            {
                errMsg = "仓库不存在";
                this.lbl_branch.Text = "";
                this.txt_branch.Text = "";
            }
            else
            {
                errMsg = "";
                this.lbl_branch.Text = branch_Info.branch_name;
                this.txt_branch.Text = branch_Info.branch_no;
            }
        }
Пример #3
0
        public void LoadCb()
        {
            //角色
            IBLL.IOper bll = new BLL.OperBLL();
            var        lis = bll.GetOperTypeList();

            this.cbType.DisplayMember = "type_name";
            this.cbType.ValueMember   = "oper_type";
            this.cbType.DataSource    = lis;

            //机构
            IBLL.IBranch brbll  = new BLL.BranchBLL();
            var          branch = brbll.GetAllList("");

            this.txtBranch.Bind(branch, 300, 150, "branch_no", "branch_no:机构编码:80,branch_name:机构名称:150", "branch_no/branch_name->Text");
        }
Пример #4
0
        private void OK()
        {
            IBLL.IBranch bll = new BLL.BranchBLL();
            if (branch == null || string.IsNullOrEmpty(branch.branch_no))
            {
                //添加
                bi_t_branch_info banks = new bi_t_branch_info()
                {
                    display_flag = checkIsStop.Checked ? "0" : "1",
                    branch_no    = txtBranchNo.Text,
                    branch_name  = txtBranchName.Text,
                    branch_man   = txtBranchMan.Text,
                    update_time  = DateTime.Now,
                };
                bll.Add(banks);
                if (banks.branch_no.Length == 2)
                {
                    banks = new bi_t_branch_info()
                    {
                        display_flag = checkIsStop.Checked ? "0" : "1",
                        branch_no    = txtBranchNo.Text + "01",
                        branch_name  = txtBranchName.Text,
                        branch_man   = txtBranchMan.Text,
                        update_time  = DateTime.Now,
                    };
                    bll.Add(banks);
                }
            }
            else
            {
                //修改
                branch.display_flag = this.checkIsStop.Checked ? "0" : "1";
                branch.branch_name  = this.txtBranchName.Text;
                branch.branch_man   = this.txtBranchMan.Text;
                branch.address      = this.txtBranchAddres.Text;
                branch.update_time  = DateTime.Now;

                bll.Upload(branch);
            }
        }
Пример #5
0
        private void LoadBranch()
        {
            IBLL.IBranch bll = new BLL.BranchBLL();

            string code = "";

            this.tv.Invoke((MethodInvoker) delegate
            {
                code = this.tv.SelectedNode == null ? "" : this.tv.SelectedNode.Tag.ToString();
            });

            tb = bll.GetAllList(code);
            tb.Columns.Add("row_color", typeof(Color));

            foreach (DataRow dr in tb.Rows)
            {
                dr["row_color"] = dr["display_flag"].Equals("0") ? Color.Red : Color.Black;
            }

            this.dgvBranch.Invoke((MethodInvoker) delegate
            {
                this.dgvBranch.DataSource = tb;
            });
        }
Пример #6
0
        public frmCashOrder()
        {
            InitializeComponent();

            Helper.GlobalData.InitForm(this);
            try
            {
                System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
                //
                Thread th = new Thread(() =>
                {
                    Helper.GlobalData.windows.ShowLoad(this);
                    try
                    {
                        IBLL.IPayment paymentBLL = new BLL.PaymentBLL();
                        var pay_way_tb           = paymentBLL.GetAllList();
                        this.txtpay_way.Invoke((MethodInvoker) delegate
                        {
                            this.txtpay_way.Bind(pay_way_tb, 300, 200, "pay_way", "pay_way:类型编码:100,pay_name:付款类型:150",
                                                 "pay_way/pay_name->Text");
                        });
                        IBLL.IBank bankBLL = new BLL.BankBLL();
                        var bank_tb        = bankBLL.GetAllList();
                        this.txtpay_way.Invoke((MethodInvoker) delegate
                        {
                            this.txtvisa.Bind(bank_tb, 300, 200, "visa_id", "visa_id:编号:100,visa_nm:名称:130",
                                              "visa_id/visa_nm->Text");
                        });
                        var bank_tb2 = bankBLL.GetAllList();
                        this.txtvisa2.Invoke((MethodInvoker) delegate
                        {
                            txtvisa2.Bind(bank_tb2, 300, 200, "visa_id", "visa_id:编号:100,visa_nm:名称:130",
                                          "visa_id/visa_nm->Text");
                        });
                        IBLL.IBranch branchBLL = new BLL.BranchBLL();
                        var branch_tb          = branchBLL.GetAllList(4);
                        this.txtbranch.Invoke((MethodInvoker) delegate
                        {
                            txtbranch.Bind(branch_tb, 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_tb = peopleBLL.GetDataTable("", "", 1, 1, 20000, out tmp);
                        this.txtpeople.Invoke((MethodInvoker) delegate
                        {
                            txtpeople.Bind(people_tb, 250, 200, "oper_id", "oper_id:职员编号:80,oper_name:姓名:80", "oper_id/oper_name->Text");
                        });

                        this.Invoke((MethodInvoker) delegate
                        {
                            IOrder ins = this;
                            ins.Add();
                        });
                    }
                    catch (Exception ex)
                    {
                        LogHelper.writeLog("frmCashOrder", ex.ToString());
                        MsgForm.ShowFrom(ex);
                    }
                    Helper.GlobalData.windows.CloseLoad(this);
                    Cursor.Current = Cursors.Default;
                });
                th.Start();
            }
            catch (Exception ex)
            {
                MsgForm.ShowFrom(ex);
            }
            finally
            {
                System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
            }
        }
Пример #7
0
        private void LoadItem()
        {
            string    keyword = this.txtKeyword.Text.Trim();
            DataTable dt      = new DataTable();

            if (this.op_type == "1")
            {
                //商品
                IBLL.IItem bll = new BLL.ItemBLL();
                dt = bll.QuickSearchList(keyword);
                if (dt.Rows.Count == 0)
                {
                }
                else if (dt.Rows.Count == 1)
                {
                    this.item_no = dt.Rows[0]["item_subno"].ToString();
                    DialogResult = System.Windows.Forms.DialogResult.OK;
                    this.Close();
                }
            }
            else if (this.op_type == "2")
            {
                //客户
                IBLL.ICus bll = new BLL.CusBLL();
                dt = bll.QuickSearchList(keyword);
                if (dt.Rows.Count == 1)
                {
                    this.item_no = dt.Rows[0]["supcust_no"].ToString();
                    DialogResult = System.Windows.Forms.DialogResult.OK;
                    this.Close();
                }
            }
            else if (this.op_type == "3")
            {
                //供应商
                IBLL.ISup bll = new BLL.SupBLL();
                dt = bll.QuickSearchList(keyword);
                if (dt.Rows.Count == 1)
                {
                    this.item_no = dt.Rows[0]["supcust_no"].ToString();
                    DialogResult = System.Windows.Forms.DialogResult.OK;
                    this.Close();
                }
            }
            else if (this.op_type == "4")
            {
                //业务员
                IBLL.IPeople bll = new BLL.PeopleBLL();
                dt = bll.QuickSearchList("02", keyword);
                if (dt.Rows.Count == 1)
                {
                    this.item_no = dt.Rows[0]["oper_id"].ToString();
                    DialogResult = System.Windows.Forms.DialogResult.OK;
                    this.Close();
                }
            }
            else if (this.op_type == "5")
            {
                //仓库
                IBLL.IBranch bll = new BLL.BranchBLL();
                dt = bll.QuickSearchList(keyword);
                if (dt.Rows.Count == 1)
                {
                    this.item_no = dt.Rows[0]["branch_no"].ToString();
                    DialogResult = System.Windows.Forms.DialogResult.OK;
                    this.Close();
                }
            }
            this.dgvItem.DataSource = dt;
            if (dt.Rows.Count > 0)
            {
                this.dgvItem.Focus();
            }
            else
            {
                this.txtKeyword.Focus();
            }
        }
Пример #8
0
        private void LoadCb()
        {
            Thread th = new Thread(() =>
            {
                Helper.GlobalData.windows.ShowLoad(this);
                try
                {
                    LoadSetting();
                    Cursor.Current = Cursors.WaitCursor;
                    //日期格式
                    Dictionary <string, string> DateMaskdic = new Dictionary <string, string>()
                    {
                        { "yyyy-MM-dd", DateTime.Now.ToString("yyyy-MM-dd") },
                        { "yyyy-MM-dd HH:MM:SS", DateTime.Now.ToString("yyyy-MM-dd HH:MM:SS") },
                        { "yyyy/MM/dd", DateTime.Now.ToString("yyyy/MM/dd") },
                        { "yyyy年MM月dd日", DateTime.Now.ToString("yyyy年MM月dd日") },
                        { "yy年MM月dd日", DateTime.Now.ToString("yy年MM月dd日") },
                        { "yy-MM-dd", DateTime.Now.ToString("yy-MM-dd") },
                        { "yy-MM-dd HH:MM:SS", DateTime.Now.ToString("yy-MM-dd HH:MM:SS") },
                    };
                    this.cbDateMask.Invoke((MethodInvoker) delegate
                    {
                        this.cbDateMask.DisplayMember = "Value";
                        this.cbDateMask.ValueMember   = "Key";
                        this.cbDateMask.DataSource    = new BindingSource(DateMaskdic, null);
                    });


                    //数量格式
                    Dictionary <string, string> NumberMaskdic = new Dictionary <string, string>()
                    {
                        { "#,###,###,##0.00", "#,###,###,##0.00" },
                        { "#,###,###,##0.0000", "#,###,###,##0.0000" },
                        { "#########0.00", "#########0.00" },
                        { "#########0.0000", "#########0.0000" },
                        { "#,###,###,###.00", "#,###,###,###.00" },
                        { "#,###,###,###.0000", "#,###,###,###.0000" },
                        { "##########.00", "##########.00" },
                        { "##########.##", "##########.##" },
                        { "#,###,###,###.##", "#,###,###,###.##" },
                        { "#,###,###,##0", "#,###,###,##0" },
                        { "##########0", "##########0" },
                        { "#,###,###,###", "#,###,###,###" },
                        { "##########", "##########" },
                    };
                    this.cbNumberMask.Invoke((MethodInvoker) delegate
                    {
                        this.cbNumberMask.DisplayMember = "Value";
                        this.cbNumberMask.ValueMember   = "Key";
                        this.cbNumberMask.DataSource    = new BindingSource(NumberMaskdic, null);
                    });


                    //价格格式
                    Dictionary <string, string> PriceMaskdic = new Dictionary <string, string>()
                    {
                        { "¥#,###,###,##0.00", "¥#,###,###,##0.00" },
                        { "$ #,###,###,##0.00", "$ #,###,###,##0.00" },
                        { "#,###,###,##0.00", "#,###,###,##0.00" },
                        { "#########0.00", "#########0.00" },
                        { "#########0.0000", "#########0.0000" },
                        { "#,###,###,##0.0000", "#,###,###,##0.0000" },
                        { "#,###,###,###.00", "#,###,###,###.00" },
                        { "#,###,###,###.0000", "#,###,###,###.0000" },
                        { "#,###,###,###.##", "#,###,###,###.##" },
                        { "##########.##", "##########.##" },
                        { "#,###,###,##0", "#,###,###,##0" },
                        { "#,###,###,###", "#,###,###,###" },
                        { "#########0", "#########0" },
                        { "##########", "##########" },
                    };

                    this.cbPriceMask.Invoke((MethodInvoker) delegate
                    {
                        this.cbPriceMask.DisplayMember = "Value";
                        this.cbPriceMask.ValueMember   = "Key";
                        this.cbPriceMask.DataSource    = new BindingSource(PriceMaskdic, null);
                    });


                    //金额显示
                    this.cbMoneyMask.Invoke((MethodInvoker) delegate
                    {
                        this.cbMoneyMask.DisplayMember = "Value";
                        this.cbMoneyMask.ValueMember   = "Key";
                        this.cbMoneyMask.DataSource    = new BindingSource(PriceMaskdic, null);
                    });



                    //仓库
                    IBLL.IBranch bll = new BLL.BranchBLL();
                    var tb           = bll.GetAllList("");

                    this.cbgs_defa_branch.Invoke((MethodInvoker) delegate
                    {
                        this.cbgs_defa_branch.DisplayMember = "branch_name";
                        this.cbgs_defa_branch.ValueMember   = "branch_no";
                        this.cbgs_defa_branch.DataSource    = tb;
                    });


                    //特殊显示下拉框
                    Dictionary <string, string> cbDic = new Dictionary <string, string>()
                    {
                        { ">", "大于" },
                        { "<", "小于" },
                        { "=", "标准" },
                    };

                    this.Invoke((MethodInvoker) delegate
                    {
                        this.cbNum.DisplayMember   = "Value";
                        this.cbNum.ValueMember     = "Key";
                        this.cbNum.DataSource      = new BindingSource(cbDic, null);
                        this.cbPrice.DisplayMember = "Value";
                        this.cbPrice.ValueMember   = "Key";
                        this.cbPrice.DataSource    = new BindingSource(cbDic, null);
                    });


                    //货商产生规则下拉框
                    Dictionary <string, string> hsDic = new Dictionary <string, string>()
                    {
                        { "1.商品类别 + 流水号", "1.商品类别 + 流水号" },
                        { "2.货商编码 + 流水号", "2.货商编码 + 流水号" },
                        { "3.自动递增", "3.自动递增" },
                    };

                    this.cbItemNoAuto.Invoke((MethodInvoker) delegate
                    {
                        this.cbItemNoAuto.DisplayMember = "Value";
                        this.cbItemNoAuto.ValueMember   = "Key";
                        this.cbItemNoAuto.DataSource    = new BindingSource(hsDic, null);
                    });


                    //批发级别
                    Dictionary <string, string> pricedic = new Dictionary <string, string>()
                    {
                        { "1", "一级" },
                        { "2", "二级" },
                        { "3", "三级" },
                    };

                    this.cblevel_price_pf.Invoke((MethodInvoker) delegate
                    {
                        this.cblevel_price_pf.DisplayMember = "Value";
                        this.cblevel_price_pf.ValueMember   = "Key";
                        this.cblevel_price_pf.DataSource    = new BindingSource(pricedic, null);
                    });


                    //超过客户信誉额度销售:cust_credit
                    Dictionary <string, string> cust_creditdic = new Dictionary <string, string>()
                    {
                        { "0", "允许" },
                        { "1", "不允许" },
                        { "2", "允许但提示" },
                    };

                    this.cbcust_credit.Invoke((MethodInvoker) delegate
                    {
                        this.cbcust_credit.DisplayMember = "Value";
                        this.cbcust_credit.ValueMember   = "Key";
                        this.cbcust_credit.DataSource    = new BindingSource(cust_creditdic, null);
                    });


                    //低于系统库存时出库或高于库存上限进货:Stock_check
                    Dictionary <string, string> Stock_checkdic = new Dictionary <string, string>()
                    {
                        { "0", "不允许" },
                        { "1", "允许,但提示" },
                        { "2", "允许,不提示" },
                    };

                    this.cbStock_check.Invoke((MethodInvoker) delegate
                    {
                        this.cbStock_check.DisplayMember = "Value";
                        this.cbStock_check.ValueMember   = "Key";
                        this.cbStock_check.DataSource    = new BindingSource(Stock_checkdic, null);
                    });


                    //低于进价销售:pos_check_price
                    this.cbpos_check_price.Invoke((MethodInvoker) delegate
                    {
                        this.cbpos_check_price.DisplayMember = "Value";
                        this.cbpos_check_price.ValueMember   = "Key";
                        this.cbpos_check_price.DataSource    = new BindingSource(Stock_checkdic, null);
                    });


                    //非主供应商商品第一次进货(退货,赠送):check_sup_item
                    this.cbcheck_sup_item.Invoke((MethodInvoker) delegate
                    {
                        this.cbcheck_sup_item.DisplayMember = "Value";
                        this.cbcheck_sup_item.ValueMember   = "Key";
                        this.cbcheck_sup_item.DataSource    = new BindingSource(Stock_checkdic, null);
                    });

                    //货商进货价采用:sup_pricetype
                    Dictionary <string, string> sup_pricetypedic = new Dictionary <string, string>()
                    {
                        { "0", "最后进价" },
                        { "1", "约定进价" },
                        { "2", "最低进价" },
                        { "3", "商品档案中的进价" },
                    };
                    this.cbsup_pricetype.Invoke((MethodInvoker) delegate
                    {
                        this.cbsup_pricetype.DisplayMember = "Value";
                        this.cbsup_pricetype.ValueMember   = "Key";
                        this.cbsup_pricetype.DataSource    = new BindingSource(sup_pricetypedic, null);
                    });


                    //货商退货价采用:sup_ro_pricetype
                    Dictionary <string, string> sup_ro_pricetypedic = new Dictionary <string, string>()
                    {
                        { "0", "最后进价" },
                        { "1", "约定进价" },
                        { "2", "最低进价" },
                        { "3", "商品档案中的进价" },
                        { "4", "当前库存平均价" },
                        { "5", "指定批次进价" },
                    };

                    this.cbsup_ro_pricetype.Invoke((MethodInvoker) delegate
                    {
                        this.cbsup_ro_pricetype.DisplayMember = "Value";
                        this.cbsup_ro_pricetype.ValueMember   = "Key";
                        this.cbsup_ro_pricetype.DataSource    = new BindingSource(sup_ro_pricetypedic, null);
                    });


                    //客户批发价采用:cust_pricetype
                    Dictionary <string, string> cust_pricetypedic = new Dictionary <string, string>()
                    {
                        { "0", "最后批发价" },
                        { "1", "约定批发价" },
                        { "2", "最低批发价" },
                        { "3", "商品档案中的批发价" },
                    };
                    this.cbcust_pricetype.Invoke((MethodInvoker) delegate
                    {
                        this.cbcust_pricetype.DisplayMember = "Value";
                        this.cbcust_pricetype.ValueMember   = "Key";
                        this.cbcust_pricetype.DataSource    = new BindingSource(cust_pricetypedic, null);
                    });


                    //4.4客户退货价采用: cust_ri_pricetype
                    Dictionary <string, string> cust_ri_pricetypedic = new Dictionary <string, string>()
                    {
                        { "0", "最后批发价" },
                        { "1", "约定批发价" },
                        { "2", "最低批发价" },
                        { "3", "商品档案中的批发价" },
                        { "4", "指定批次销售价" },
                    };
                    this.cbcust_ri_pricetype.Invoke((MethodInvoker) delegate
                    {
                        this.cbcust_ri_pricetype.DisplayMember = "Value";
                        this.cbcust_ri_pricetype.ValueMember   = "Key";
                        this.cbcust_ri_pricetype.DataSource    = new BindingSource(cust_ri_pricetypedic, null);
                    });

                    this.Invoke((MethodInvoker) delegate
                    {
                        LoadMain(this);
                        this.Opacity = 100;
                    });


                    Cursor.Current = Cursors.Default;
                }
                catch (Exception ex)
                {
                    LogHelper.writeLog("LoadOper", ex.ToString());
                    MsgForm.ShowFrom(ex);
                }
                GlobalData.windows.CloseLoad(this);
            });

            th.Start();
        }
Пример #9
0
        public frmFYOrder()
        {
            InitializeComponent();
            //
            Helper.GlobalData.InitForm(this);
            //
            var tb = new DataTable();

            tb.Columns.Add("type_no");
            tb.Columns.Add("type_name");
            tb.Columns.Add("bill_cash");
            tb.Columns.Add("type_flag");
            tb.Columns.Add("memo");

            editGrid1.AddColumn("type_no", "费用代码", "", 90, 1, "", true);
            editGrid1.AddColumn("type_name", "费用名称", "", 140, 1, "", false);
            editGrid1.AddColumn("bill_cash", "费用(金额)", "", 100, 3, "0.00", true);
            editGrid1.AddColumn("type_flag", "收支类型", "", 75, 2, "{0:-,1:+}", false);
            editGrid1.AddColumn("memo", "备注", "", 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.FYOrder bll = new BLL.FYOrder();

                        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("type_no", edgrid, 400, 200, "pay_way", "pay_way:费用代码:80,pay_name:费用名称:150,pay_kind:方向:60", "pay_way->type_no,pay_name->type_name,pay_kind->type_flag");
                        });

                        IBLL.IPayment paymentBLL = new BLL.PaymentBLL();

                        var pay_way = paymentBLL.GetAllList();
                        this.txtpay_way.Invoke((MethodInvoker) delegate
                        {
                            this.txtpay_way.Bind(pay_way, 300, 200, "pay_way", "pay_way:类型编码:100,pay_name:付款类型:150", "pay_way/pay_name->Text");
                        });

                        IBLL.IBank bankBLL = new BLL.BankBLL();
                        var visa           = bankBLL.GetAllList();
                        this.txtvisa.Invoke((MethodInvoker) delegate
                        {
                            txtvisa.Bind(visa, 300, 200, "visa_id", "visa_id:编号:100,visa_nm:名称:130", "visa_id/visa_nm->Text");
                        });

                        IBLL.IBranch branchBLL = new BLL.BranchBLL();
                        var branch             = branchBLL.GetAllList(4);
                        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");
                        });

                        this.Invoke((MethodInvoker) delegate
                        {
                            IOrder ins = this;
                            ins.Add();
                        });
                    }
                    catch (Exception ex)
                    {
                        IvyBack.Helper.LogHelper.writeLog("frmFYOrder", 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;
            }
        }