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(); }
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; }
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); }
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(); }
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(); } }
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"); }