示例#1
0
        protected void btnSearchSell_Click(object sender, EventArgs e)
        {
            ReserveOrders ro = new ReserveOrders(DateTime.Now, DateTime.Now, 0, string.Empty, string.Empty, null);

            ro.CusFullName         = txtSearchSell.Text;
            gvSellOrder.DataSource = ro.searchSaleOrder();
            gvSellOrder.DataBind();
        }
示例#2
0
 public Customer(string n, string s, string p, string a, ReserveOrders ROrder)
 {
     this.name    = n;
     this.surname = s;
     this.phone   = p;
     this.address = a;
     this.ROrder  = ROrder;
 }
示例#3
0
        private int insertReserveOrder(string customer, string receiveDate)
        {
            ReserveOrders ro = new ReserveOrders(DateTime.Now, DateTime.Now, 0, string.Empty, string.Empty, null);
            int           id = ro.insertReserveOrder(customer, receiveDate);

            //int id = ro.getMaxReserveID();
            return(id);
        }
示例#4
0
        protected void gvSellOrder_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            GridView gvSellOrder = (sender as GridView);

            gvSellOrder.PageIndex = e.NewPageIndex;
            ReserveOrders ro = new ReserveOrders(DateTime.Now, DateTime.Now, 0, string.Empty, string.Empty, null);

            gvSellOrder.DataSource = ro.getSaleOrder();
            gvSellOrder.DataBind();
        }
示例#5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         txtSearch.Attributes.Add("onKeyPress", "doClick('" + btnSearch.ClientID + "',event)");
         txtSearchSell.Attributes.Add("onKeyPress", "doClick('" + btnSearchSell.ClientID + "',event)");
         ReserveOrders ro = new ReserveOrders(DateTime.Now, DateTime.Now, 0, string.Empty, string.Empty, null);
         gvReserveOrder.DataSource = ro.getReserveOrder();
         gvReserveOrder.DataBind();
         gvSellOrder.DataSource = ro.getSaleOrder();
         gvSellOrder.DataBind();
     }
 }
示例#6
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            ReserveOrders ro        = new ReserveOrders(DateTime.Now, DateTime.Now, 0, string.Empty, string.Empty, null);
            string        reserveID = lblRI.Text;
            ReserveItems  ri        = new ReserveItems(0, string.Empty, string.Empty, null);
            DataTable     dt        = ri.getReserveItem(reserveID);

            foreach (DataRow item in dt.Rows)
            {
                string fruitType = item["fruitType"].ToString();
                string fruitSeed = item["fruitSeed"].ToString();
                string grade     = item["grade"].ToString();
                int    amount    = int.Parse(item["quantity"].ToString());
                ri.updateStock(fruitType, fruitSeed, grade, amount);
            }
            ro.updateSellStatus(reserveID);
            Response.Redirect("Home.aspx");
        }