コード例 #1
0
        private void DoViewNewItems(int id)
        {
            //int id = Convert.ToInt32(hdnKioskID.Value);
            var instance = Kiosk.GetKioskByID(id);

            lblKioskNameList.Text = instance.Name;

            gvNewItems.DataSource = Inventory.GetAllByKiosk(id);
            gvNewItems.DataBind();
        }
コード例 #2
0
        private void DoAssign(int id)
        {
            var instance = Kiosk.GetKioskByID(id);

            hdnKioskID.Value = id.ToString();

            LblKioskName.Text = instance.Name;
            lblLocation.Text  = instance.Location;

            tbDistReciept.Text = "";
            tbReference.Text   = "";
            //
            //var collection = Stocks.GetKioskPhoneStocks(id, 0);
            //if(collection.Count > 0) tbReference.Text = collection[0].Reference;

            /////
            #region PHONE SET
            lbxPhone.DataSource     = Products.GetAllPhones();
            lbxPhone.DataTextField  = "Name";
            lbxPhone.DataValueField = "ID";
            lbxPhone.DataBind();
            //
            //lbxPhoneSel.DataSource = Stocks.GetKioskPhoneStocks(id, (int)ProductType.Phone);
            //lbxPhoneSel.DataTextField = "ProdName";
            //lbxPhoneSel.DataValueField = "ProdID";
            //lbxPhoneSel.DataBind();
            //
            //foreach (ListItem li in lbxPhoneSel.Items)
            //{
            //    lbxPhone.Items.Remove(li);
            //}
            lbxPhoneSel.Items.Clear();
            #endregion
            /////
            #region TABLET SET
            lbxTablet.DataSource     = Products.GetAllTablets();
            lbxTablet.DataTextField  = "Name";
            lbxTablet.DataValueField = "ID";
            lbxTablet.DataBind();
            //
            //lbxTabletSel.DataSource = Stocks.GetKioskPhoneStocks(id, (int)ProductType.Tablet);
            //lbxTabletSel.DataTextField = "ProdName";
            //lbxTabletSel.DataValueField = "ProdID";
            //lbxTabletSel.DataBind();
            //
            //foreach (ListItem li in lbxTabletSel.Items)
            //{
            //    lbxTablet.Items.Remove(li);
            //}
            lbxTabletSel.Items.Clear();
            #endregion
            /////
            #region ACCESSORY SET
            lbxAccessory.DataSource     = Products.GetAllAccessories();
            lbxAccessory.DataTextField  = "Name";
            lbxAccessory.DataValueField = "ID";
            lbxAccessory.DataBind();
            //

            //lbxAccessorySel.DataSource = Stocks.GetKioskPhoneStocks(id, (int)ProductType.Accessory);
            //lbxAccessorySel.DataTextField = "ProdName";
            //lbxAccessorySel.DataValueField = "ProdID";
            //lbxAccessorySel.DataBind();
            //
            //foreach (ListItem li in lbxAccessorySel.Items)
            //{
            //    lbxAccessory.Items.Remove(li);
            //}
            lbxAccessorySel.Items.Clear();
            #endregion
        }