protected void Page_Load(object sender, System.EventArgs e) { if (!Page.IsPostBack) { if ((Request.QueryString.Get("ID") != null)) { string strId = ""; objEncrypt = new clsEncryption(); try { // strId = objEncrypt.Decrypt(Request.QueryString.Get("ID"), appFunctions.strKey); strId = Request.QueryString.Get("ID"); // string strCourierComapnyId = objEncrypt.Decrypt(Request.QueryString.Get("CID"), appFunctions.strKey); if (strId != "") { objSubOrder = new tblSubOrder(); objDataTable = objSubOrder.GetSubOrderListMainfest(strId.TrimEnd(',').Trim(), Convert.ToInt32(Enums.Enums_OrderStatus.ReadyToShip).ToString()); dgvGridView.DataSource = null; dgvGridView.DataBind(); if (objDataTable.Rows.Count > 0) { objMenifest = new tblManifest(); objMenifest.AddNew(); // objMenifest.AppSellerID = Convert.ToInt32(Session[appFunctions.Session.SellerID.ToString()]); objMenifest.AppCreatedDate = GetDateTime(); objMenifest.Save(); iMenifestID = objMenifest.AppManifestID; objMenifest = null; printButton.Visible = true; lblSiteName.Text = appFunctions.strAppname.ToString() + " (ID-" + iMenifestID.ToString() + ")"; lblSellerName.Text = appFunctions.strSellerName.ToString(); // spanMenifestNo.InnerHtml = iMenifestID.ToString(); // spanProviderName.InnerHtml = objDataTable.Rows[0][tblCourierCompany.ColumnNames.AppCourierCompany].ToString(); if (objDataTable.Rows[0]["appSelfCourier"].ToString() != "") { lblCourierComp.Text = ((Enums.Enum_CourierCompany) int.Parse(objDataTable.Rows[0]["appSelfCourier"].ToString())).ToString(); } spanPackage.InnerHtml = objDataTable.Rows.Count.ToString(); objSubOrder.SetSubOrderMenifest(strId.TrimEnd(',').Trim(), iMenifestID, Convert.ToInt32(Enums.Enums_OrderStatus.ReadyToShip).ToString()); divlbl.Visible = true; } else { printButton.Visible = false; divlbl.Visible = false; } dgvGridView.DataSource = objDataTable; dgvGridView.DataBind(); objSubOrder = null; } else { printButton.Visible = false; } } catch (Exception ex) { } objEncrypt = null; } } }