Esempio n. 1
0
        protected void InsertNewCategory_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtbxCatName.Text.Trim() == string.Empty)
                {
                    ModlPopupCategories.Show();
                    lblErrMessage.Text = "Please enter the category name.";
                }
                int    insertNewCategory = 0;
                string tempName          = txtbxCatName.Text.Trim();

                if (txtbxCatName.Text.Trim() != string.Empty)
                {
                    insertNewCategory = (new CatalogCategoriesDAL()).InsertNewCategory_DAL(tempName);

                    BindCategories();
                    clearAddNewCategory();
                }
            }
            catch (Exception ex)
            {
                string strErrCode = ERROR_DISPLAY_MESSAGE + "," + (new Error_Log()).LogErrorIntoDB(ex, "InsertNewCategory_Click");
                lblErr.Text = strErrCode;
            }
        }
Esempio n. 2
0
 protected void CancelCategory_Click(object sender, EventArgs e)
 {
     try
     {
         ModlPopupCategories.Hide();
     }
     catch (Exception ex)
     {
         string strErrCode = ERROR_DISPLAY_MESSAGE + "," + (new Error_Log()).LogErrorIntoDB(ex, "CancelCategory_Click");
         lblErr.Text = strErrCode;
     }
 }
Esempio n. 3
0
 protected void addNewCategory_Click(object sender, EventArgs e)
 {
     try
     {
         ModlPopupCategories.Show();
         lblErrMessage.Text    = string.Empty;
         lblErrCategories.Text = string.Empty;
     }
     catch (Exception ex)
     {
         string strErrCode = ERROR_DISPLAY_MESSAGE + "," + (new Error_Log()).LogErrorIntoDB(ex, "addNewCategory_Click");
         lblErr.Text = strErrCode;
     }
 }