private void LoadTextNull()
 {
     try
     {
         TEN_LOAI_TDTextEdit.EditValue   = String.Empty;
         TEN_LOAI_TD_ATextEdit.EditValue = String.Empty;
         TEN_LOAI_TD_HTextEdit.EditValue = String.Empty;
         TEN_LOAI_TDTextEdit.Focus();
     }
     catch { }
 }
        private bool bKiemTrung()
        {
            try
            {
                DataTable dtTmp = new DataTable();
                Int16     iKiem = 0;

                iKiem = Convert.ToInt16(SqlHelper.ExecuteScalar(Commons.IConnections.CNStr, "spCheckData", "ID_LOAI_TD",
                                                                (AddEdit ? "-1" : Id.ToString()), "LOAI_TRINH_DO", "TEN_LOAI_TD", TEN_LOAI_TDTextEdit.EditValue.ToString(),
                                                                "", "", "", ""));
                if (iKiem > 0)
                {
                    XtraMessageBox.Show(Commons.Modules.ObjLanguages.GetLanguage(this.Name, "msgTEN_LOAI_TDNayDaTonTai"));
                    TEN_LOAI_TDTextEdit.Focus();
                    return(true);
                }

                iKiem = 0;

                if (!string.IsNullOrEmpty(TEN_LOAI_TD_ATextEdit.Text))
                {
                    iKiem = Convert.ToInt16(SqlHelper.ExecuteScalar(Commons.IConnections.CNStr, "spCheckData", "ID_LOAI_TD",
                                                                    (AddEdit ? "-1" : Id.ToString()), "LOAI_TRINH_DO", "TEN_LOAI_TD_A", TEN_LOAI_TD_ATextEdit.EditValue.ToString(),
                                                                    "", "", "", ""));
                    if (iKiem > 0)
                    {
                        XtraMessageBox.Show(Commons.Modules.ObjLanguages.GetLanguage(this.Name, "msgTEN_LOAI_TD_ANayDaTonTai"));
                        TEN_LOAI_TD_ATextEdit.Focus();
                        return(true);
                    }
                }

                iKiem = 0;
                if (!string.IsNullOrEmpty(TEN_LOAI_TD_HTextEdit.Text))
                {
                    iKiem = Convert.ToInt16(SqlHelper.ExecuteScalar(Commons.IConnections.CNStr, "spCheckData", "ID_LOAI_TD",
                                                                    (AddEdit ? "-1" : Id.ToString()), "LOAI_TRINH_DO", "TEN_LOAI_TD_H", TEN_LOAI_TD_HTextEdit.EditValue.ToString(),
                                                                    "", "", "", ""));
                    if (iKiem > 0)
                    {
                        XtraMessageBox.Show(Commons.Modules.ObjLanguages.GetLanguage(this.Name, "msgTEN_LOAI_TD_HNayDaTonTai"));
                        TEN_LOAI_TD_HTextEdit.Focus();
                        return(true);
                    }
                }
            }
            catch (Exception ex)
            {
                XtraMessageBox.Show(ex.Message.ToString());
                return(true);
            }
            return(false);
        }