Ejemplo n.º 1
0
        private void toolStripButton1_Click_1(object sender, EventArgs e)
        {
            if (null == ly_sales_clientDataGridView.CurrentRow)
            {
                return;
            }
            string s = this.ly_sales_clientDataGridView.CurrentRow.Cells["客户编码"].Value.ToString();
            //int loanid = int.Parse(this.xD_Client_LoanDataGridView.CurrentRow.Cells["Id_loan"].Value.ToString());
            string            name      = this.ly_sales_clientDataGridView.CurrentRow.Cells["客户名称"].Value.ToString();
            LY_SalesclientAdd queryForm = new LY_SalesclientAdd();


            queryForm.runmode          = "修改";
            queryForm.salesclient_code = s;
            queryForm.client_name      = name;

            queryForm.StartPosition = FormStartPosition.CenterParent;
            queryForm.ShowDialog();

            if (queryForm.DialogResult != DialogResult.Cancel)
            {
                this.ly_sales_clientTableAdapter.Fill(this.lYSalseMange.ly_sales_client);

                this.treeView1.SelectedNode = FindNode(this.treeView1.Nodes, queryForm.salesperson_code);
                this.ly_sales_clientBindingSource.Position = this.ly_sales_clientBindingSource.Find("客户编码", s);
            }
        }
Ejemplo n.º 2
0
        private void bindingNavigatorAddNewItem_Click_1(object sender, EventArgs e)
        {
            LY_SalesclientAdd queryForm = new LY_SalesclientAdd();

            queryForm.salesclient_code = "";
            queryForm.runmode          = "增加";


            queryForm.StartPosition = FormStartPosition.CenterParent;
            queryForm.ShowDialog();

            if (queryForm.DialogResult != DialogResult.Cancel)
            {
                this.ly_sales_clientTableAdapter.Fill(this.lYSalseMange.ly_sales_client);

                this.treeView1.SelectedNode = FindNode(this.treeView1.Nodes, queryForm.salesperson_code);

                this.ly_sales_clientBindingSource.Position = this.ly_sales_clientBindingSource.Find("客户编码", queryForm.salesclient_code);
            }
        }