BKI_DichVuMatDat.DanhMuc.F110_dm_chuc_vu_de.check_validate_data C# (CSharp) Method

check_validate_data() private method

private check_validate_data ( ) : bool
return bool
        private bool check_validate_data()
        {
            if (m_sle_don_vi.EditValue == null)
            {
                string v_str_error = "Bạn chưa chọn đơn vị!";
                XtraMessageBox.Show(v_str_error, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return false;
            }
            else if (m_sle_loai_chuc_vu.EditValue == null)
            {
                string v_str_error = "Bạn chưa chọn loại chức vụ!";
                XtraMessageBox.Show(v_str_error, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return false;
            }
            else if (m_txt_ma_chuc_vu.Text.Trim() == "")
            {
                string v_str_error = "Bạn chưa nhập mã chức vụ!";
                XtraMessageBox.Show(v_str_error, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return false;
            }
            else if (m_txt_ten_chuc_vu.Text.Trim() == "")
            {
                string v_str_error = "Bạn chưa nhập tên chức vụ!";
                XtraMessageBox.Show(v_str_error, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return false;
            }
            else if (m_txt_thu_tu.Text.Trim() == "")
            {
                string v_str_error = "Bạn chưa nhập thứ tự chức vụ!";
                XtraMessageBox.Show(v_str_error, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return false;
            }
            else if (check_ma_cv_da_ton_tai())
            {
                string v_str_error = "Mã chức vụ đã tồn tại!";
                XtraMessageBox.Show(v_str_error, "Lỗi", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return false;
            }
            return true;
        }