protected void Page_Load(object sender, EventArgs e)
        {
            lblMessage.Text = "";
            if (!IsPostBack)
            {
                CCategory cat = ApplicationSession.category;
                if (cat.IsEmpty())
                {
                    lblMessage.Text = "No Record of Category";
                }
                else
                {
                    MySqlConnection conn = CMain.GetConnection(ApplicationSession.DBName);
                    lblTitle.Text = cat.Caption;
                    List <CCatGroup> lst = cat.ListOfCategoryGroup(conn, ApplicationSession.StoreID, ApplicationSession.OutletID);
                    lvwCatGroup.DataSource = lst;
                    lvwCatGroup.DataBind();

                    lblDateOfFunction.Text = cat.OrderDate_ToString;
                    lblNoOfPax.Text        = cat.OrderQty_ToString;
                }
            }
        }
        protected void lvwCategory_ItemCommand(object sender, ListViewCommandEventArgs e)
        {
            ListViewItem item = e.Item;
            HiddenField  hf   = (HiddenField)item.FindControl("hf_Category");
            CCategory    cat  = JsonConvert.DeserializeObject <CCategory>(hf.Value);

            if ((cat != null) && (!cat.IsEmpty()))
            {
                ApplicationSession.category = cat;
                if (cat.HasDetail)
                {
                    MySqlConnection conn = CMain.GetConnection(ApplicationSession.DBName);
                    if (cat.HasMenuOption(conn, ApplicationSession.StoreID, ApplicationSession.OutletID))
                    {
                        Master.DisplayModalDialog_CategoryInfo();
                    }
                }
                else
                {
                    string url = "CategoryPage.aspx?id=" + cat.ID.ToString();
                    Response.Redirect(url);
                }
            }
        }