Example #1
0
        private void InsUpdDelKnittingCategory(char Event, int id)
        {
            var msg = "";

            if (Event == 'I' || Event == 'U')
            {
                var objKnittingCategory = new KnittingCategory(id, txtCategoryName.Text);
                msg = BL_Knitting_Category.InsUpdDelKnittingCategory(Event, objKnittingCategory, out id);
            }
            else
            {
                var objKnittingCategory = new KnittingCategory(id, "");
                msg = BL_Knitting_Category.InsUpdDelKnittingCategory(Event, objKnittingCategory, out id);
            }

            if (DatabaseMessage.ContainMessage(msg))
            {
                _msgbox.ShowSuccess(msg);
            }
            else
            {
                _msgbox.ShowWarning(msg);
            }
            FillGridview();
            ClearAll();
        }
Example #2
0
        public static DropDownList FillddlKnittingCategory(DropDownList ddl, int EVENT, int ID, string CODE)
        {
            ddl.Items.Clear();
            var dt = BL_Knitting_Category.GetAllKnittingCategory(EVENT, ID, CODE, "");

            if (dt.Rows.Count > 0)
            {
                ddl.DataSource     = dt;
                ddl.DataValueField = "Id";
                ddl.DataTextField  = "Category";
                ddl.DataBind();
                ddl.Items.Insert(0, new ListItem("Select", "0", true));
            }
            return(ddl);
        }
Example #3
0
 private void FillGridview()
 {
     gvKnittingCategorySetup.DataSource = BL_Knitting_Category.GetAllKnittingCategory(1, 0, "", "");
     gvKnittingCategorySetup.DataBind();
 }