protected void ClearItemData(bool NewItem) { // if NewItem is true, we are clearing after an item is entered SSGridView.DataBind(); DetailUpdatePanel.Update(); ItemDescLabel.Text = ""; Wgt100Label.Text = ""; QtyUOMLabel.Text = ""; StdCostLabel.Text = ""; UPCLabel.Text = ""; WebLabel.Text = ""; CategoryLabel.Text = ""; NetWghtLabel.Text = ""; SuperEqLabel.Text = ""; ListLabel.Text = ""; HarmCodeLabel.Text = ""; PackGroupLabel.Text = ""; PlatingLabel.Text = ""; GrossWghtLabel.Text = ""; PriceUMLabel.Text = ""; CFVLabel.Text = ""; PPILabel.Text = ""; ParentLabel.Text = ""; StockLabel.Text = ""; CostUMLabel.Text = ""; CatVelLabel.Text = ""; PkgVelLabel.Text = ""; CreatedLabel.Text = ""; HeaderUpdatePanel.Update(); CategorySpecLabel.Text = ""; MessageUpdatePanel.Update(); HeadImageUpdatePanel.Visible = false; BodyImageUpdatePanel.Visible = false; }
protected void GetLPNData(string Loc) { try { // get the data. ds = SqlHelper.ExecuteDataset(RBConnectionString, "pWHSLPNSummary", new SqlParameter("@Branch", LocationDropDownList.SelectedItem.Value.ToString()), new SqlParameter("@ShipMeth", "")); if (ds.Tables.Count == 1) { dt = ds.Tables[0]; if (dt.Rows.Count > 0) { LPNGridView.DataSource = dt; LPNGridView.DataBind(); DetailUpdatePanel.Update(); Session["LPNData"] = dt; } else { //lblErrorMessage.Text = "Error " + ItemNoTextBox.Text + ":" + QuoteFilterValueHidden.Value + ":" + QOHCommandHidden.Value; lblErrorMessage.Text = "No Recipt Bins in Branch " + Loc; MessageUpdatePanel.Update(); } } } catch (Exception e3) { lblErrorMessage.Text = "pWHSLPNSummary Error " + e3.Message + ", " + e3.ToString(); MessageUpdatePanel.Update(); } }
protected void ShowData() { PurchImpGridView.DataSource = dt; PurchImpGridView.DataBind(); DetailUpdatePanel.Update(); Session["PICatListData"] = dt; }
protected void GetData(string Loc, string BegLPN, string EndLPN, string BegBOL, string EndBOL, string BegDate, string EndDate) { Session["FilteredXDocData"] = null; try { lblErrorMessage.Text = ""; MessageUpdatePanel.Update(); dt = null; lblErrorMessage.Text = ""; // get the data. dt = CheckError(XDockData.SearchUnprocessed( Loc , BegLPN , EndLPN , BegBOL , EndBOL , BegDate , EndDate )); if ((dt != null) && (dt.Rows.Count > 0)) { dt.Columns.Add("PageNo"); RePage(dt); Session["XDocData"] = dt; BindPageDetails(); } else { //lblErrorMessage.Text = "Error " + _ToLoc + ":" + _BegContainer + ":" + _EndContainer + ":" // + _BegBOL + ":" + _EndBOL + ":" // + BegDate.SelectedDate.ToShortDateString() + ":" + EndDate.SelectedDate.ToShortDateString(); lblErrorMessage.Text = "No Records Found."; XDocGridView.DataBind(); Session["XDocData"] = dt; } MessageUpdatePanel.Update(); } catch (Exception e3) { lblErrorMessage.Text = "pContainerCrossDocForm Error " + e3.Message + ", " + e3.ToString(); MessageUpdatePanel.Update(); } DetailUpdatePanel.Update(); SelectorUpdatePanel.Visible = false; SearchUpdatePanel.Visible = true; DetailGridPanel.Visible = true; pnlPager.Visible = true; BottomPanel.Visible = true; ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "", "SetHeight();", true); }
protected void GetData() { Session["FilteredRcptData"] = null; try { dt = null; lblErrorMessage.Text = ""; MessageUpdatePanel.Update(); // get the data. dt = CheckError(ReceiptData.SearchUnprocessed(LocationDropDownList.SelectedItem.Value.ToString().Trim() , LPNBeg.Text.ToString().Trim() , "" , BOLBeg.Text.ToString().Trim() , "" , BegDate.SelectedDate.ToShortDateString() , EndDate.SelectedDate.ToShortDateString() )); Session["LPNRcptData"] = dt; if ((dt != null) && (dt.Rows.Count > 0)) { dt.Columns.Add("PageNo"); RePage(dt); BindPageDetails(); FindSubmit.Visible = true; } else { //lblErrorMessage.Text = "Error " + _ToLoc + ":" + _BegContainer + ":" + _EndContainer + ":" // + _BegBOL + ":" + _EndBOL + ":" // + BegDate.SelectedDate.ToShortDateString() + ":" + EndDate.SelectedDate.ToShortDateString(); lblErrorMessage.Text = "No Records Found.."; MessageUpdatePanel.Update(); FindSubmit.Visible = false; XDocGridView.DataBind(); } SearchUpdatePanel.Update(); } catch (Exception e3) { lblErrorMessage.Text = "pContainerCrossDocForm Error " + e3.Message + ", " + e3.ToString(); MessageUpdatePanel.Update(); } DetailUpdatePanel.Update(); SelectorUpdatePanel.Visible = false; SearchUpdatePanel.Visible = true; DetailGridPanel.Visible = true; pnlPager.Visible = true; BottomPanel.Visible = true; }
public void LocSortLinkButton_Click(Object sender, EventArgs e) { if (LocSortHidden.Value == "LocID") { LocSortHidden.Value = "SortKey"; } else { LocSortHidden.Value = "LocID"; } try { //LocSortLinkButton.Text = LocSortHidden.Value; DataView SSview = ((DataTable)Session["StockData"]).DefaultView; SSview.Sort = LocSortHidden.Value; BindSSGrid(SSview.ToTable()); DetailUpdatePanel.Update(); } catch { } }
protected void ShowMakeButton() { MakeCreditButt.Visible = false; MakeRGAButt.Visible = false; RGAReturnToLabel.Visible = false; RGAReturnToDropDown.Visible = false; if (OrderIDHidden.Value.ToString() != "") { switch (OrderTypeDropDownList.SelectedItem.Value.ToString()) { case "PRGA": MakeRGAButt.Visible = true; RGAReturnToLabel.Visible = true; RGAReturnToDropDown.Visible = true; break; case "PCR": MakeCreditButt.Visible = true; break; } DetailUpdatePanel.Update(); } }
protected void btnSearch_Click(object sender, EventArgs e) { //tPager.Visible = true; //BSSGridView.CurrentPageIndex = 0; //Pager1.GotoPageNumber = 0; //pnlPager.Update(); lblErrorMessage.Text = ""; lblSuccessMessage.Text = ""; MessageUpdatePanel.Update(); if (txtBranchNo.Text.Trim().Length == 0) { lblErrorMessage.Text = "You must enter a Branch Number."; MessageUpdatePanel.Update(); } else { lblErrorMessage.Text = ""; ClearDisplay(); //Validate Item Params if (string.IsNullOrEmpty(txtStrCat.Text)) { txtStrCat.Text = "00000"; if (string.IsNullOrEmpty(txtEndCat.Text)) { txtEndCat.Text = "99999"; } } else { if (string.IsNullOrEmpty(txtEndCat.Text)) { txtEndCat.Text = txtStrCat.Text; } } if (string.IsNullOrEmpty(txtStrSize.Text)) { txtStrSize.Text = "0000"; if (string.IsNullOrEmpty(txtEndSize.Text)) { txtEndSize.Text = "9999"; } } else { if (string.IsNullOrEmpty(txtEndSize.Text)) { txtEndSize.Text = txtStrSize.Text; } } if (string.IsNullOrEmpty(txtStrVar.Text)) { txtStrVar.Text = "000"; if (string.IsNullOrEmpty(txtEndVar.Text)) { txtEndVar.Text = "999"; } } else { if (string.IsNullOrEmpty(txtEndVar.Text)) { txtEndVar.Text = txtStrVar.Text; } } //Get the data using pSSLocExcelDump ds = SqlHelper.ExecuteDataset(cnERP, "pSSLocExcelDump", new SqlParameter("@LocID", txtBranchNo.Text.Trim()), new SqlParameter("@StrCat", txtStrCat.Text.Trim()), new SqlParameter("@StrSize", txtStrSize.Text.Trim()), new SqlParameter("@StrVar", txtStrVar.Text.Trim()), new SqlParameter("@EndCat", txtEndCat.Text.Trim()), new SqlParameter("@EndSize", txtEndSize.Text.Trim()), new SqlParameter("@EndVar", txtEndVar.Text.Trim())); if (ds.Tables.Count >= 1) { dt = ds.Tables[0]; if (dt.Rows.Count > 0) { DataView dv = new DataView(dt, hidRowFilter.Value.ToString(), hidSort.Value.ToString(), DataViewRowState.CurrentRows); // BSSGridView.DataSource = dv; lblSuccessMessage.Text = dt.Rows.Count.ToString().Trim() + " record(s) found. Click Excel button to Export"; Session["BSSData"] = dt; BSSGridView.DataBind(); ExcelUpdatePanel.Visible = true; SelectorUpdatePanel.Update(); DetailUpdatePanel.Update(); } else { lblErrorMessage.Text = "No Branch Status for Branch Location " + txtBranchNo.Text.Trim(); MessageUpdatePanel.Update(); Session["BSSData"] = null; BSSGridView.DataBind(); } MessageUpdatePanel.Update(); } } }
private void LoadSelectedRetention(int selectedRowIdx) { int focusedRowIdx = RetentionGridView.FocusedRowIndex; if (selectedRowIdx > 0) { RetentionGridView.FocusedRowIndex = selectedRowIdx; focusedRowIdx = selectedRowIdx; } if (RetentionGridView.FocusedRowIndex > -1) { // Show / hide batch navigation button based on focused row index RetentionSchedule retentionSchedule = BuildRetentionItemFromGrid(); if (retentionSchedule != null) { clientNameLiteral.Text = (retentionSchedule == null) ? "" : retentionSchedule.ClientName; EndOfMonthLiteral.Text = (retentionSchedule == null) ? "" : retentionSchedule.EndOfMonth.ToString(); int facilityType = 0; facilityType = retentionSchedule.ClientFacilityType; if (facilityType == 1) { RetnSchedulesLiteral2.Text = "Retention Schedules: " + retentionSchedule.ClientName; PageDescription.DescriptionContent = "Retention Schedules"; //testName = "facilityType == 1"; } else { RetnSchedulesLiteral2.Text = "Monthly Fee Schedules: " + retentionSchedule.ClientName; PageDescription.DescriptionContent = "Monthly Fees & Charges Schedules"; //testName = "facilityType != 1"; } if (retentionSchedule.Status.Trim().ToUpper().Equals("HELD") || retentionSchedule.Status.Trim().ToUpper().Equals("OK")) { //REf : CFF-21 if (facilityType == 1) { _retnSchedHeader = "Retention Statement"; } else if (facilityType == 5)//CA { _retnSchedHeader = "Current Account Fees & Charges Statement"; } else //4 or 2 { _retnSchedHeader = "Fees & Charges Statement"; } } else { if (facilityType == 1) { _retnSchedHeader = "Estimated Retention Release"; } else if (facilityType == 5)//CA { _retnSchedHeader = "Current Account Estimated Fees & Charges"; } else //4 or 2 { _retnSchedHeader = "Estimated Fees & Charges"; } } RetnHeaderLiteral.Text = _retnSchedHeader; LoadTabInActiveTabView(retentionSchedule); } } else { var tab = FindActiveTab(); if (tab != null) { tab.ClearTabData(); } } int RowCount = (RetentionGridView.DataSource as IList <RetentionSchedule>).Count; PreviousRetentionButton.Visible = (RowCount == 1) ? false : ((focusedRowIdx > 0) ? true : false); NextRetentionButton.Visible = (RowCount == 1) ? false : ((focusedRowIdx == 0) ? true : ((focusedRowIdx < (RowCount - 1)) ? true : false)); DetailUpdatePanel.Update(); }
protected void GetDocument(string InvoiceNo, string SONo) { try { OrderIDHidden.Value = ""; Session["CreditDetailTable"] = null; ClearPageMessages(); // get the data. ds = SqlHelper.ExecuteDataset(connectionString, "pSOEGetCreditRGA", new SqlParameter("@PassedInvoice", InvoiceNo), new SqlParameter("@PassedOrder", SONo)); if (ds.Tables.Count >= 1) { if (ds.Tables.Count == 1) { // We only go one table back, something is wrong dt = ds.Tables[0]; if (dt.Rows[0]["ErrorType"].ToString().Trim() + dt.Rows[0]["ErrorCode"].ToString() == "E0081") { ShowPageMessage("Document is on file but is the wrong type", 2); CreditRGAScriptManager.SetFocus("InvoiceNoTextBox"); return; } if (dt.Rows[0]["ErrorType"].ToString().Trim() + dt.Rows[0]["ErrorCode"].ToString() == "E0001") { ShowPageMessage("Document not found. " + InvoiceNo + "," + SONo, 2); CreditRGAScriptManager.SetFocus("InvoiceNoTextBox"); return; } if (dt.Rows.Count > 0) { ShowPageMessage("GetCreditRGA processing error. " + InvoiceNo + "," + SONo, 2); return; } } else { dt = ds.Tables[1]; if (dt.Rows.Count == 0) { HeaderGridView.DataBind(); HeaderUpdatePanel.Update(); DetailGridView.DataBind(); DetailUpdatePanel.Update(); ShowPageMessage("Invoice/Order not found.", 2); CreditRGAScriptManager.SetFocus("InvoiceNoTextBox"); } else { DetailGridView.DataSource = dt; DetailGridView.DataBind(); Session["CreditDetailTable"] = dt; OrderIDHidden.Value = ds.Tables[2].Rows[0]["FoundID"].ToString().Trim(); ShipLocHidden.Value = ds.Tables[2].Rows[0]["ShipLoc"].ToString().Trim(); try { RGAReturnToDropDown.SelectedValue = ShipLocHidden.Value.ToString(); } catch { } ShowMakeButton(); DetailUpdatePanel.Update(); dt = ds.Tables[2]; HeaderGridView.DataSource = dt; HeaderGridView.DataBind(); HeaderUpdatePanel.Update(); } } } ScriptManager.RegisterClientScriptBlock(InvoiceNoTextBox, InvoiceNoTextBox.GetType(), "SizeUpdate", "SetHeight();", true); } catch (Exception e2) { ShowPageMessage("GetCreditRGA Error " + e2.Message + ", " + e2.ToString(), 2); } }
protected void btnSearch_Click(object sender, EventArgs e) { lblErrorMessage.Text = ""; lblSuccessMessage.Text = ""; MessageUpdatePanel.Update(); string Track = "Timer" + DateTime.Now.ToString("mm:ss"); if (txtCustNo.Text.Trim().Length == 0) { lblErrorMessage.Text = "You must enter a Customer Number."; MessageUpdatePanel.Update(); } else { try { lblErrorMessage.Text = ""; ClearDisplay(); //Get the data using pCustPriceGetHist Track += "|DataBeg" + DateTime.Now.ToString("mm:ss"); ds = SqlHelper.ExecuteDataset(ConnectionString, "pCustPriceGetHist", new SqlParameter("@CustNo", txtCustNo.Text.Trim()), new SqlParameter("@itemType", (rdoBulk.Checked ? "Bulk" : "Package"))); Track += "|DataEnd" + DateTime.Now.ToString("mm:ss"); if (ds.Tables.Count == 2) { dt = ds.Tables[0]; if (dt.Rows.Count > 0) { lblCustName.Text = dt.Rows[0]["CustomerName"].ToString(); lblBranch.Text = dt.Rows[0]["Branch"].ToString(); lblRecType.Text = ""; CPSMRecTypeHidden.Value = dt.Rows[0]["RecType"].ToString(); if (CPSMRecTypeHidden.Value.ToString() == "0") { lblRecType.Text = "These are New records wating for Targets."; } if (CPSMRecTypeHidden.Value.ToString() == "1") { lblRecType.Text = "These are Unprocessed waiting for Appproval."; } hidSort.Value = ""; hidSort.Attributes["sortType"] = "DESC"; hidRowFilter.Value = "GroupType = 'C'"; // Change Target column header based on item type CPSMGridView.Columns[7].HeaderText = (rdoBulk.Checked ? "Target" : "Bulk +"); DataView dv = new DataView(dt, hidRowFilter.Value.ToString(), hidSort.Value.ToString(), DataViewRowState.CurrentRows); CPSMGridView.DataSource = dv; Session["CPSMData"] = dt; Track += "|Session" + DateTime.Now.ToString("mm:ss"); CPSMGridView.DataBind(); Track += "|DataBind" + DateTime.Now.ToString("mm:ss"); if (ApprovalOKHidden.Value.ToUpper() == "TRUE") { ApproveUpdatePanel.Visible = true; SubmitUpdatePanel.Visible = false; } else { ApproveUpdatePanel.Visible = false; SubmitUpdatePanel.Visible = true; } if (hidShowCostBasis.Value == "TRUE") { ibtnSetBasis.Visible = true; } else { ibtnSetBasis.Visible = false; } if (hidPriceAnalysis.Value == "TRUE") { btnPriceAnalysis.Visible = true; } else { btnPriceAnalysis.Visible = false ; } ExcelUpdatePanel.Visible = true; SelectorUpdatePanel.Update(); DetailUpdatePanel.Update(); } else { lblErrorMessage.Text = "No Price Schedule Data For Customer " + txtCustNo.Text.Trim(); MessageUpdatePanel.Update(); Session["CPSMData"] = null; CPSMGridView.DataBind(); } Track += "|HdrBeg" + DateTime.Now.ToString("mm:ss"); dtSched = ds.Tables[1]; if (dtSched.Rows.Count > 0) { if (string.IsNullOrEmpty(lblCustName.Text.ToString())) { lblCustName.Text = dtSched.Rows[0]["CustomerName"].ToString(); } if (string.IsNullOrEmpty(lblBranch.Text.ToString())) { lblBranch.Text = dtSched.Rows[0]["Branch"].ToString(); } lblSched1.Text = dtSched.Rows[0]["ContractSchd1"].ToString(); lblSched2.Text = dtSched.Rows[0]["ContractSchd2"].ToString(); lblSched3.Text = dtSched.Rows[0]["ContractSchd3"].ToString(); lblSched4.Text = dtSched.Rows[0]["ContractSchedule4"].ToString(); lblSched5.Text = dtSched.Rows[0]["ContractSchedule5"].ToString(); lblSched6.Text = dtSched.Rows[0]["ContractSchedule6"].ToString(); lblSched7.Text = dtSched.Rows[0]["ContractSchedule7"].ToString(); lblTargetGross.Text = String.Format("{0:0.0}", dtSched.Rows[0]["TargetGrossMarginPct"]); lblWebDiscPct.Text = String.Format("{0:0.00}", dtSched.Rows[0]["WebDiscountPct"]); chkWebDiscInd.Checked = (dtSched.Rows[0]["WebDiscountInd"].ToString().ToUpper().Trim() == "1"); lblCustDefPrice.Text = dtSched.Rows[0]["CustomerDefaultPrice"].ToString(); lblCustPriceInd.Text = dtSched.Rows[0]["CustomerPriceInd"].ToString(); lblCreditInd.Text = dtSched.Rows[0]["CreditInd"].ToString(); lblActGrossMgnPct.Text = dtSched.Rows[0]["ActGrossMgnPct"].ToString(); lblDefaultCostPct.Text = dtSched.Rows[0]["TargetCostPlusPct"].ToString(); } else { lblErrorMessage.Text = "Customer " + txtCustNo.Text.Trim() + " Not On File"; MessageUpdatePanel.Update(); } Track += "|HdrEnd" + DateTime.Now.ToString("mm:ss"); lblSuccessMessage.Text = Track; MessageUpdatePanel.Update(); } } catch (Exception e3) { lblErrorMessage.Text = "pCustPriceGetHist Error " + e3.Message + ", " + e3.ToString(); MessageUpdatePanel.Update(); } } }