private void btnAdd_Click(object sender, EventArgs e) { currentStatus = currentStatusEnum.addingStatus; InitAllComponetsStatus(true); txt_id.Enabled = false; CleanAllTheComponest(); txt_id.Text = CustomerLAO.getCustomerCurrentVal().ToString(); }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { int selectIndex = dataGridView1.CurrentRow.Index; // int selectIndex = Int32.Parse( this.dataGridView1.SelectedCells[0].Value.ToString()); datagridSlect = selectIndex; InitAllComponetsStatus(true); txt_id.Enabled = false; Customer aCustomer = new Customer(); aCustomer = listCustomer[selectIndex]; SetAllComponetsValues(aCustomer); currentStatus = currentStatusEnum.editingStatus; }