コード例 #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            AddCustomer frmAddCustomer = new AddCustomer();


            frmAddCustomer.CallFromUserControll = this;
            frmAddCustomer.ShowDialog();
        }
コード例 #2
0
        private void dgvProductList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            AddCustomer     frmAddCustomer = new AddCustomer();
            DataGridViewRow currentRow     = dgvProductList.Rows[e.RowIndex];

            int id = ObjectHelper.GetValueFromAnonymousType <int>(currentRow.DataBoundItem, "Id");

            frmAddCustomer.loadDataForEditCustomer(id);

            frmAddCustomer.CallFromUserControll = this;
            frmAddCustomer.ShowDialog();
        }
コード例 #3
0
 private void btnCreateKH_Click(object sender, EventArgs e)
 {
     AddCustomer frmAddCustomer = new AddCustomer();
     if(frmAddCustomer.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         CustomerService customerService = new CustomerService();
         customers = new BindingList<Customer>(customerService.GetCustomers());
         if (customers != null)
         {
             cbxCustomer.DataSource = customers;
             cbxCustomer.DisplayMember = "CustomerName";
             cbxCustomer.ValueMember = "Id";
             cbxCustomer.SelectedIndex = customers.Count - 1;
         }
     }
 }
コード例 #4
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            AddCustomer frmAddCustomer = new AddCustomer();
            

            frmAddCustomer.CallFromUserControll = this;
            frmAddCustomer.ShowDialog();
        }
コード例 #5
0
        private void dgvProductList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            AddCustomer frmAddCustomer = new AddCustomer();
            DataGridViewRow currentRow = dgvProductList.Rows[e.RowIndex];

            int id = ObjectHelper.GetValueFromAnonymousType<int>(currentRow.DataBoundItem, "Id");
            frmAddCustomer.loadDataForEditCustomer(id);

            frmAddCustomer.CallFromUserControll = this;
            frmAddCustomer.ShowDialog();
        }
コード例 #6
0
 private void tsbAddCustomer_Click(object sender, EventArgs e)
 {
     AddCustomer frmAddCustomer = new AddCustomer();
     pnlMain.Controls.Clear();
     frmAddCustomer.ShowDialog();
 }