Ejemplo n.º 1
0
        }// End of BindColors method...

        protected void AddNewColor_Click(object sender, EventArgs e)
        {
            try
            {
                ModlPopupColor.Show();
                lblErrMessage.Text = string.Empty;
            }
            catch (Exception ex)
            {
                string strErrCode = ERROR_DISPLAY_MESSAGE + "," + (new Error_Log()).LogErrorIntoDB(ex, "AddNewColor_Click");
                lblErr.Text = strErrCode;
            }
        }
Ejemplo n.º 2
0
        /*
         * Insert new Color
         */
        protected void InsertNewColor_Click(object sender, EventArgs e)
        {
            try
            {
                if (txtBxNewColorName.Text.Trim() == string.Empty)
                {
                    ModlPopupColor.Show();
                    lblErrMessage.Text = "Please enter the color name.";
                    return;
                }
                if (txtBxNewColorCode.Text.Trim() == string.Empty)
                {
                    ModlPopupColor.Show();
                    lblErrMessage.Text = "Please enter the color code.";
                    return;
                }

                string colorName  = txtBxNewColorName.Text.Trim();
                string colorCode  = txtBxNewColorCode.Text.Trim();
                string colorValue = txtBxNewColorvalue.Text.Trim();

                if (txtBxNewColorName.Text != string.Empty && txtBxNewColorCode.Text != string.Empty)
                {
                    int insertNewColor = (new CatalogColorsDAL()).InsertNewColor_DAL(colorName, colorCode, colorValue);
                    if (insertNewColor == 0)
                    {
                        ModlPopupColor.Show();
                        lblErrMessage.Text = "Color Code is already exist.";
                        return;
                    }
                    else
                    {
                        BindColors();
                        clearInsertNewColorData();
                    }
                }
            }
            catch (Exception ex)
            {
                string strErrCode = ERROR_DISPLAY_MESSAGE + "," + (new Error_Log()).LogErrorIntoDB(ex, "InsertNewColor_Click");
                lblErr.Text = strErrCode;
            }
        }//End of InsertNewColor_Click method...