private void btnSave_Click(object sender, EventArgs e) { EOrganization d = new EOrganization(); d.Update(txtName.Text, txtController.Text, txtDyController.Text, txtPhone.Text, txtEmail.Text, txtAddress.Text); MessageBox.Show("Record Updated"); this.Close(); }
private void LoadList() { EOrganization d = new EOrganization(); DataTable dt = d.GetList(); if (dt != null) { txtName.Text = dt.Rows[0]["Name"].ToString(); txtController.Text = dt.Rows[0]["Controller"].ToString(); txtDyController.Text = dt.Rows[0]["DyController"].ToString(); txtPhone.Text = dt.Rows[0]["Phone"].ToString(); txtEmail.Text = dt.Rows[0]["Email"].ToString(); txtAddress.Text = dt.Rows[0]["Address"].ToString(); } }