Пример #1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            rule r = new rule();

            if (txtPositionID.Text.Trim().Length > 0 && txtPositionName.Text.Trim().Length > 0 && r.CheckNumber(txtSalary.Text.Trim()) == true)
            {
                try
                {
                    positionBLL.Save(txtPositionID.Text, txtPositionName.Text, txtSalary.Text, txtPositionID.Text);
                    //update control

                    //
                    btnSave.Enabled = false;
                    DisplayNotify("Lưu dữ liệu thành công", 1);
                }
                catch (Exception ex)
                {
                    DisplayNotify("Lỗi Lưu  dữ liệu không thành công", -1);
                }
            }
            else
            {
                DisplayNotify("Lỗi nhập sai các ô nhập liệu hoặc nhập thiếu", -1);
            }
        }