Example #1
0
        public void loadPharmacy()
        {
            pharmacy newPage = new pharmacy(parent, this);

            pageTransitionControl.TransitionType = PageTransitionType.Fade;
            pageTransitionControl.ShowPage(newPage);
        }
Example #2
0
        /// <summary>
        /// Display list of items in cart
        /// </summary>
        /// <param name="_parent"></param>
        /// <param name="_subparent"></param>
        /// <param name="_sub"></param>
        public cart(MainWindow _parent, patient_frame _subparent, pharmacy _sub)
        {
            parent    = _parent;
            subparent = _subparent;
            pharmacy  = _sub;
            InitializeComponent();

            DataTable qry   = parent.query("select * from cart where login_user_id=" + _subparent.AccountId);
            int       count = 0;

            foreach (DataRow rw in qry.Rows)
            {
                CartItem item = new CartItem();
                item.cost = rw["cost"].ToString();
                item.drug = rw["drug"].ToString();
                item.cid  = rw["cart_id"].ToString();
                count++;
                item.id = count;
                listView.Items.Add(item);
            }
        }