Exemple #1
0
        private void Item()
        {
            int    pos      = 0;
            string d        = string.Empty;
            var    itemList = new Item().getAllRecords(Item_support.Column.Name, Item_support.Order.ASCENDING);

            foreach (var item in itemList)
            {
                if (pos % 3 == 0)
                {
                    d += "<div class='row'>";
                }
                d += elements.DisplayItems(enc.EncryptString(item.Id, SV.Key), SV.GetImage(item.Picture), item.Name, item.Description, SV.GetUGX(item.Price));
                if (pos % 3 == 2)
                {
                    d += "</div>";
                }
                pos++;
            }
            if (pos % 3 != 0)
            {
                d += "</div>";
            }
            ITemLiteral.Text = d;
        }
Exemple #2
0
 void LoadDetails()
 {
     user_linksLiteral.Text = SV.Name;
     if (!string.IsNullOrEmpty(SV.ProfileImage))
     {
         piclink.Attributes.Add("style", "display:none;");
     }
     ImageLiteral.Text = $"<img src='../../Images/{SV.GetImage(SV.ProfileImage)}' alt='' class='img-responsive' />";
 }
Exemple #3
0
        void ItemInfoDisplay(string id)
        {
            var item = new Item(enc.DecryptString(id, SV.Key));

            Session["item"]       = item.Name;
            costText.InnerText    = SV.GetUGX(item.Price);
            desc.InnerText        = item.Description;
            ModelITemLiteral.Text = elements.GetItemToCart(item.Id, SV.GetImage(item.Picture));
            ItemBtnCart.Text      = elements.BtnAddToCart(enc.EncryptString(item.Id, SV.Key));
        }
Exemple #4
0
        private void LoadData(string id)
        {
            id = enc.DecryptString(id, SV.LoginKey);
            var uDetails = new User_details(id);

            fname.InnerText   = uDetails.Fname.ToUpper();
            lname.InnerText   = uDetails.Lname.ToUpper();
            NameLiteral.Text  = new User_details_view().Load_record_with(User_details_view_support.Column.Id, User_details_view_support.LogicalOperator.EQUAL_TO, id).Name;
            dob.InnerText     = DateTime.Parse(uDetails.Dob).ToLongDateString();
            contact.InnerText = uDetails.Contact;
            userTpe.InnerHtml = uDetails.User_type.ToUpper();
            var s = new Speciality_table().Load_record_with(Speciality_table_support.Column.Doctor_id, Speciality_table_support.LogicalOperator.EQUAL_TO, uDetails.User_id).Speciality;

            speciality.InnerText = !string.IsNullOrEmpty(s) ? s.ToUpper() : "N/A";
            DisplayShift(id);
            var prof = SV.GetImage(new Profile_image_table().Load_record_with(Profile_image_table_support.Column.User_id, Profile_image_table_support.LogicalOperator.EQUAL_TO, id).Url);

            ProfPicLiteral.Text = $"<img src='../../images/{SV.GetImage(prof)}' alt='' class='img-responsive' />";
        }
Exemple #5
0
 private void LoadDetails()
 {
     user_linksLiteral.Text = SV.Name;
     ImageLiteral.Text      = $"<img src='../../Images/{SV.GetImage(SV.ProfileImage)}' alt='' class='img-responsive' />";
 }
Exemple #6
0
        void DisplayCartContent()
        {
            var Cartlist = (List <Cart>)Session["cartList"];
            var d        = string.Empty;

            if (Cartlist == null)
            {
                d = "<p>Cart is empty!<p>";
            }
            else
            {
                var tempTotal = 0;
                var tp        = 0;
                foreach (var item in Cartlist)
                {
                    var cart     = new Item(item.ItemID);
                    var subtotal = int.Parse(cart.Price) * int.Parse(item.Qty);
                    tempTotal += subtotal;
                    d         += elements.GetCartItemRows(enc.EncryptString(cart.Id, SV.Key), SV.GetImage(cart.Picture), item.Qty, cart.Name, cart.Price, subtotal.ToString());
                }
                subTotal.Text         = tempTotal.ToString();
                transportLiteral.Text = tp.ToString();
                Total.Text            = (tp + tempTotal).ToString();
            }
            CartITemLiteral.Text = d;
        }