private void metroTile2_Click(object sender, EventArgs e) { Forms.EditCus ec = new Forms.EditCus(this); ec.txtCName.Text = this.gvCustomer.CurrentRow.Cells[1].Value.ToString(); ec.txtCAddress.Text = this.gvCustomer.CurrentRow.Cells[2].Value.ToString(); ec.txtCEmail.Text = this.gvCustomer.CurrentRow.Cells[3].Value.ToString(); ec.txtCPhone.Text = this.gvCustomer.CurrentRow.Cells[4].Value.ToString(); ec.txtCBalance.Text = this.gvCustomer.CurrentRow.Cells[5].Value.ToString(); ec.cid = int.Parse(this.gvCustomer.CurrentRow.Cells[0].Value.ToString()); ec.ShowDialog(); }
private void metroTile2_Click(object sender, EventArgs e) { if (userRolesObj.getCheckstate("AddEditParty") == true) { Forms.EditCus ec = new Forms.EditCus(this); ec.txtCName.Text = this.gvCustomer.CurrentRow.Cells[1].Value.ToString(); ec.txtCAddress.Text = this.gvCustomer.CurrentRow.Cells[2].Value.ToString(); ec.txtCEmail.Text = this.gvCustomer.CurrentRow.Cells[3].Value.ToString(); ec.txtCPhone.Text = this.gvCustomer.CurrentRow.Cells[4].Value.ToString(); ec.txtCBalance.Text = this.gvCustomer.CurrentRow.Cells[5].Value.ToString(); ec.cid = int.Parse(this.gvCustomer.CurrentRow.Cells[0].Value.ToString()); ec.ShowDialog(); } else { MessageBox.Show("you don't have permission to enter here, Contact admin For further Details"); return; } }