protected void save_or_update_salary_scale_guards() { string text; if (this.txt_scale_name.Text == string.Empty || this.txt_year_maximum.Text == string.Empty || this.txt_year_minimum.Text == string.Empty || this.txt_amt.Text == string.Empty) { MessageBox.Show("All fields are required", "save scale details", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } string str = this.txt_scale_name.Text; int num = Convert.ToInt32(this.txt_year_minimum.Text); int num1 = Convert.ToInt32(this.txt_year_maximum.Text); float single = float.Parse(this.txt_amt.Text); if (this.txt_record_guid.Text != string.Empty) { text = this.txt_record_guid.Text; } else { text = null; } Salary_scales.save_or_update_salary_scale_guards("save_or_update_salary_scale_guards", str, num, num1, single, text); MessageBox.Show("New salary saved successfully", "save scale details", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); }
protected void save_or_update_salary_scale_guards() { if (txt_scale_name.Text == String.Empty || txt_year_maximum.Text == String.Empty || txt_year_minimum.Text == String.Empty || txt_amt.Text == String.Empty) { MessageBox.Show("All fields are required", "save scale details", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { Salary_scales.save_or_update_salary_scale_guards("save_or_update_salary_scale_guards", txt_scale_name.Text, Convert.ToInt32(txt_year_minimum.Text), Convert.ToInt32(txt_year_maximum.Text), float.Parse(txt_amt.Text), txt_record_guid.Text != String.Empty?txt_record_guid.Text:null); MessageBox.Show("New salary saved successfully", "save scale details", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }