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; } }
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; } }