Exemplo n.º 1
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            if (null == ly_supplier_listDataGridView.CurrentRow)
            {
                return;
            }
            string s = this.ly_supplier_listDataGridView.CurrentRow.Cells["编码"].Value.ToString();

            //int loanid = int.Parse(this.xD_Client_LoanDataGridView.CurrentRow.Cells["Id_loan"].Value.ToString());
            this.Nowsupplier_code = s;
            LY_SupplierAdd queryForm = new LY_SupplierAdd();

            queryForm.sortmode      = this.sortmode;
            queryForm.runmode       = "修改";
            queryForm.supplier_code = s;
            queryForm.Sortcode      = this.sortcode;

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

            if (queryForm.DialogResult != DialogResult.Cancel)
            {
                this.ly_supplier_listTableAdapter.Fill(this.lYMaterielRequirements.ly_supplier_list, this.sortcode);
                this.ly_supplier_listBindingSource.Position = this.ly_supplier_listBindingSource.Find("编码", s);
            }
        }
Exemplo n.º 2
0
        private void bindingNavigatorAddNewItem_Click(object sender, EventArgs e)
        {
            ////////////////////////////////////



            LY_SupplierAdd queryForm = new LY_SupplierAdd();

            queryForm.supplier_code = "";
            queryForm.runmode       = "增加";
            queryForm.sortmode      = this.sortmode;
            queryForm.Sortcode      = this.sortcode;

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

            if (queryForm.DialogResult != DialogResult.Cancel)
            {
                this.ly_supplier_listTableAdapter.Fill(this.lYMaterielRequirements.ly_supplier_list, this.Sortcode);
                this.ly_supplier_listBindingSource.Position = this.ly_supplier_listBindingSource.Find("编码", queryForm.supplier_code);

                this.Nowsupplier_code = queryForm.supplier_code;
            }

            /////////////////////////////////////////
        }