private void btn_save_dept_Click(object sender, EventArgs e) { if (this.txt_dept_name.Text == string.Empty) { MessageBox.Show("Department name required"); return; } if (this.txt_dept_id.Text == string.Empty) { System_lookups.NEW_LOOKUP_DETAILS("SAVE_NEW_DEPARTMENT_DETAILS", this.txt_dept_name.Text, (this.chk_dept_active.Checked ? true : false), this.txt_department_code.Text); MessageBox.Show("Successfully saved department details"); this.GET_DEPARTMENTS(); return; } System_lookups.UPDATE_LOOKUP_DETAILS("UPDATE_DEPARTMENT_DETAILS", this.txt_dept_name.Text, (this.chk_dept_active.Checked ? true : false), Convert.ToInt32(this.txt_dept_id.Text), this.txt_department_code.Text); MessageBox.Show("Successfully updated department details"); this.GET_DEPARTMENTS(); }
private void btnsave_Click(object sender, EventArgs e) { if (this.txt_branch_name.Text == string.Empty) { MessageBox.Show("Branch name required"); return; } if (this.txt_branch_id.Text == string.Empty) { System_lookups.NEW_LOOKUP_DETAILS("SAVE_NEW_BRANCH_DETAILS", this.txt_branch_name.Text, (this.chk_branch_active.Checked ? true : false), this.txt_branch_code.Text); MessageBox.Show("Successfully saved branch details"); this.GET_BRANCHES(); return; } System_lookups.UPDATE_LOOKUP_DETAILS("UPDATE_BRANCH_DETAILS", this.txt_branch_name.Text, (this.chk_branch_active.Checked ? true : false), Convert.ToInt32(this.txt_branch_id.Text), this.txt_branch_code.Text); MessageBox.Show("Successfully updated branch details"); this.GET_BRANCHES(); }
private void btn_position_save_Click(object sender, EventArgs e) { if (this.txt_position_name.Text == string.Empty) { MessageBox.Show("Position name required"); return; } if (this.txt_position_id.Text == string.Empty) { System_lookups.NEW_LOOKUP_DETAILS("SAVE_NEW_POSITION_DETAILS", this.txt_position_name.Text, (this.chk_position_active.Checked ? true : false), this.txt_position_code.Text); MessageBox.Show("Successfully saved position details"); this.GET_POSITIONS(); return; } System_lookups.UPDATE_LOOKUP_DETAILS("UPDATE_POSITION_DETAILS", this.txt_position_name.Text, (this.chk_position_active.Checked ? true : false), Convert.ToInt32(this.txt_position_id.Text), this.txt_position_code.Text); MessageBox.Show("Successfully updated position details"); this.GET_POSITIONS(); }