Esempio n. 1
0
        public void DisplayDropdownMenu()
        {
            MySqlConnection conn = CMain.GetConnection(ApplicationSession.DBName);

            if (ApplicationSession.SalesType.IsCatering())
            {
                //Category:
                List <CCategory> lst = CCategory.ListOfCategoryZero(conn, ApplicationSession.StoreID, ApplicationSession.OutletID);
                foreach (CCategory cat in lst)
                {
                    HtmlGenericControl li = new HtmlGenericControl("li");
                    tabs.Controls.Add(li);
                    HtmlGenericControl anchor = new HtmlGenericControl("a");
                    string             url    = "CategoryPage.aspx?id=" + cat.ID.ToString();
                    anchor.Attributes.Add("href", url);
                    //anchor.Attributes.Add("runat", "server");
                    //anchor.Attributes.Add("onclick", "return MyFunction();");
                    anchor.InnerText = cat.Caption;
                    li.Controls.Add(anchor);
                }
            }
            else
            {
                //ItemGroups:
                List <CItemGroup> lst = COutlet.ListOfItemGroups(conn, ApplicationSession.StoreID, ApplicationSession.OutletID);
                foreach (CItemGroup ig in lst)
                {
                    HtmlGenericControl li = new HtmlGenericControl("li");
                    tabs.Controls.Add(li);
                    HtmlGenericControl anchor = new HtmlGenericControl("a");
                    string             url    = "MenuItemPage.aspx?id=" + ig.ID.ToString();
                    anchor.Attributes.Add("href", url);
                    //anchor.Attributes.Add("runat", "server");
                    //anchor.Attributes.Add("onclick", "return MyFunction();");
                    anchor.InnerText = ig.Name;
                    li.Controls.Add(anchor);
                }
            }

            //DeliveryMethods:
            List <CDeliveryMode> lstDelMode = COutlet.ListOfDeliveryModes(conn, ApplicationSession.StoreID, ApplicationSession.OutletID);

            foreach (CDeliveryMode delMode in lstDelMode)
            {
                HtmlGenericControl li = new HtmlGenericControl("li");
                delTabs.Controls.Add(li);
                HtmlGenericControl anchor = new HtmlGenericControl("a");
                //string url = "MenuItemPage.aspx?id=" + ig.ID.ToString();
                //anchor.Attributes.Add("href", url);
                //anchor.Attributes.Add("runat", "server");
                //anchor.Attributes.Add("onclick", "return MyFunction();");
                anchor.InnerText = delMode.Name;
                li.Controls.Add(anchor);
            }
        }
Esempio n. 2
0
        private void DisplayItemGroups()
        {
            MySqlConnection conn   = CMain.GetConnection(ApplicationSession.DBName);
            COutlet         outlet = new COutlet(ApplicationSession.OutletID, conn);

            lblTitle.InnerText = outlet.Name;
            lblSlogan.Text     = "Welcome!";

            List <CItemGroup> lst = COutlet.ListOfItemGroups(conn, outlet.StoreID, outlet.ID);

            lvItemGroup.DataSource = lst;
            lvItemGroup.DataBind();
        }
Esempio n. 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string sOutletID = Request.QueryString["oid"];
                if (sOutletID != null)
                {
                    bool isNumeric = int.TryParse(sOutletID, out int iOutletID);
                    if (isNumeric)
                    {
                        CMain.InitParams(iOutletID);
                    }
                }

                MySqlConnection   conn = CMain.GetConnection(ApplicationSession.DBName);
                List <CSalesType> lst  = COutlet.ListOfSalesTypes(conn, ApplicationSession.StoreID, ApplicationSession.OutletID);
                lvwSalesType.DataSource = lst;
                lvwSalesType.DataBind();
            }
        }
Esempio n. 4
0
 public CVector2dPainter(CListInlet aDumpIn, COutlet aOut)
 {
     this.Out    = aOut;
     this.DumpIn = aDumpIn;
 }