Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["check"] == null)
            {
                bDAO = new ExportBillDAO();
                loadProduct("");
            }
            else
            {
                if (Request["detail"] != null)
                {
                    ViewDetailOrder();
                }

                if (Request.Form["key"] != null || Request.Form["begin"] != null)
                {
                    SearchProductByKeyWord();
                    return;
                }

                if (Request.QueryString["pageChoose"] != null)
                {
                    string keyword = (string)Session["key"];
                    loadProduct(keyword);
                    return;
                }
            }
        }
 public BillController(SneakerStoreContext context)
 {
     this.context  = context;
     importBillDao = new ImportBillDAO(context);
     exportBillDao = new ExportBillDAO(context);
     supplierDao   = new SupplierDAO(context);
     shoesDao      = new ShoesDAO(context);
 }
Beispiel #3
0
        public void ViewDetailOrder()
        {
            string           rawId    = (string)Request.Form["id"];
            int              detailID = Convert.ToInt32(rawId);
            ExportBillDAO    exDAO    = new ExportBillDAO();
            ExportBill       ex       = new ExportBill();
            DetailExportBill de       = new DetailExportBill();

            Session["detailInfo"]  = exDAO.GetExportBillByID(detailID);
            Session["detailOrder"] = exDAO.GetDetailExportBillByID(detailID);
        }
Beispiel #4
0
        void checkOut()
        {
            ExportBill eb = (ExportBill)Session["cart"];

            eb.Note = Request.Form["note"];
            Staff staff = new Staff
            {
                ID = (string)Session["Name"]
            };
            Customer cus = new Customer();

            cus.ID      = Convert.ToInt32(Request.Form["cusName"]);
            eb.Staff    = staff;
            eb.Customer = cus;
            edao        = new ExportBillDAO();
            edao.insert(eb);
            eb = new ExportBill();
            Session["cart"] = eb;
        }
Beispiel #5
0
        public void loadProduct1(string begin, string end)
        {
            bDAO = new ExportBillDAO();

            int pageCurrent;

            if (Request.QueryString["pageChoose"] == null)
            {
                pageCurrent = 1;
            }
            else
            {
                string raw_page = Request.QueryString["pageChoose"];
                pageCurrent = Convert.ToInt32(raw_page);
            }
            Session["totalPage"]   = bDAO.getNumberPage1(numberInPage, begin, end);
            Session["listOrder"]   = bDAO.GetExportBill1(numberInPage, pageCurrent, begin, end);
            Session["pageCurrent"] = pageCurrent;
        }
 public CartController(SneakerStoreContext context)
 {
     this.context  = context;
     shoesDao      = new ShoesDAO(context);
     exportBillDao = new ExportBillDAO(context);
 }