protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Int32 _BoundCustomerId = 1; DateTime _BoundDeliveryDate = DateTime.Now; String _BoundNotes = String.Empty; if (Request.QueryString["CustomerID"] != null) { _BoundCustomerId = Convert.ToInt32(Request.QueryString["CustomerID"].ToString()); } if (Request.QueryString["DeliveryDate"] != null) { _BoundDeliveryDate = Convert.ToDateTime(Request.QueryString["DeliveryDate"]); } if (Request.QueryString["Notes"] != null) { _BoundNotes = Request.QueryString["Notes"].ToString(); } Session[OrderHeaderData.CONST_BOUNDCUSTOMERID] = _BoundCustomerId; Session[OrderHeaderData.CONST_BOUNDDELIVERYDATE] = _BoundDeliveryDate; Session[OrderHeaderData.CONST_BOUNDNOTES] = _BoundNotes; OrderItemTbl mine_ = new OrderItemTbl(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { long _BoundCustomerId = 1; DateTime _BoundDeliveryDate = DateTime.Now.Date; String _BoundNotes = String.Empty; if (Request.QueryString[CONST_QRYSTR_CUSTOMERID] != null) { _BoundCustomerId = Convert.ToInt32(Request.QueryString[CONST_QRYSTR_CUSTOMERID].ToString()); } if (Request.QueryString[CONST_QRYSTR_DELIVERYDATE] != null) { _BoundDeliveryDate = Convert.ToDateTime(Request.QueryString[CONST_QRYSTR_DELIVERYDATE]).Date; } if (Request.QueryString[CONST_QRYSTR_NOTES] != null) { _BoundNotes = Request.QueryString[CONST_QRYSTR_NOTES].ToString(); } Session[OrderHeaderData.CONST_BOUNDCUSTOMERID] = _BoundCustomerId; Session[OrderHeaderData.CONST_BOUNDDELIVERYDATE] = _BoundDeliveryDate.Date; Session[OrderHeaderData.CONST_BOUNDNOTES] = _BoundNotes; Session[CONST_ORDERHEADERVALUES] = null; OrderItemTbl mine_ = new OrderItemTbl(); // set the permissions MembershipUser _currMember = Membership.GetUser(); btnOrderCancelled.Enabled = (_currMember.UserName.ToLower() == "warren"); bool _EnableNew = User.IsInRole("Administrators") || User.IsInRole("AgentManager") || User.IsInRole("Agents"); btnNewItem.Enabled = _EnableNew; TrackerTools _TT = new TrackerTools(); _TT.SetTrackerSessionErrorString(string.Empty); if (Request.QueryString[CONST_QRYSTR_INVOICED] != null) { if (Request.QueryString[CONST_QRYSTR_INVOICED].Equals("Y")) { MarkItemAsInvoiced(); } } else if (Request.QueryString[CONST_QRYSTR_DELIVERED] != null) { if (Request.QueryString[CONST_QRYSTR_DELIVERED].Equals("Y")) { btnOrderDelivered_Click(sender, e); } } } else { TrackerTools _TT = new TrackerTools(); string _ErrorStr = _TT.GetTrackerSessionErrorString(); if (!string.IsNullOrEmpty(_ErrorStr)) { showMessageBox _MsgBox = new showMessageBox(this.Page, "Tracker Error", "ERROR: " + _ErrorStr); _TT.SetTrackerSessionErrorString(string.Empty); } } }