Exemplo n.º 1
0
    public string UpdApproved(string LineGroupNo, string NewApproved)
    {
        try
        {
            string status = LineGroupNo;
            string SessionID;

            //Update the table in the session variable with the new target.
            DataTable tempDt = (DataTable)Session["CPSMData"];
            //tempDt.DefaultView.RowFilter = hidRowFilter.Value;
            //DataRow[] DtRow = tempDt.DefaultView.ToTable().Select("GroupNo = " + LineGroupNo);
            DataRow[] DtRow = tempDt.Select("GroupNo = '" + LineGroupNo + "'");
            status += " now " + NewApproved;
            if (bool.Parse(NewApproved))
            {
                DtRow[0]["Approved"] = 'Y';
            }
            else
            {
                DtRow[0]["Approved"] = 'N';
            }
            Session["CPSMData"] = tempDt;
            return(status);
        }
        catch (Exception e2)
        {
            lblErrorMessage.Text = e2.ToString();
            MessageUpdatePanel.Update();

            return(e2.ToString());
        }
    }
Exemplo n.º 2
0
 protected void FTP_Click(object sender, EventArgs e)
 {
     lblErrorMessage.Text   = "";
     lblSuccessMessage.Text = "";
     if (txtFTPSite.Text.ToString().Trim().Length == 0)
     {
         lblErrorMessage.Text = "An FTP Site Address required.";
     }
     else
     {
         try
         {
             SendFile(txtFTPSite.Text.ToString().Trim(),
                      hidXMLName.Value.ToString().Trim(),
                      txtFTPUser.Text.ToString().Trim(),
                      txtFTPPassword.Text.ToString().Trim(),
                      hidXMLFilePath.Value.ToString().Trim());
             lblSuccessMessage.Text = hidXMLName.Value.ToString().Trim() + " has been sent to " + txtFTPSite.Text.ToString().Trim() + ".";
             FTPUpdatePanel.Visible = false;
         }
         catch (Exception e3)
         {
             lblErrorMessage.Text = "FTP_Click Error " + e3.ToString();
         }
     }
     MessageUpdatePanel.Update();
 }
Exemplo n.º 3
0
 protected void GetData()
 {
     try
     {
         Print.Visible = false;
         // get the data.
         ds = SqlHelper.ExecuteDataset(ERPConnectionString, "pWHSRcvRprtData",
                                       new SqlParameter("@Branch", LocationDropDownList.SelectedItem.Text.Split(new string[] { " - " }, StringSplitOptions.None)[0].Trim()),
                                       new SqlParameter("@Container", ContainerTextBox.Text.Trim()),
                                       new SqlParameter("@LPN", LPNTextBox.Text.Trim()));
         if (ds.Tables.Count == 1)
         {
             dt = ds.Tables[0];
             if (dt.Rows.Count > 0)
             {
                 lblSuccessMessage.Text = "Use the Buttons to the right to Process the Report";
                 MessageUpdatePanel.Update();
                 BindPrintDialog();
                 Print.Visible = true;
             }
             else
             {
                 //lblErrorMessage.Text = "Error " + ItemNoTextBox.Text + ":" + QuoteFilterValueHidden.Value + ":" + QOHCommandHidden.Value;
                 lblErrorMessage.Text = "No matchings Bins in Branch "
                                        + LocationDropDownList.SelectedItem.Text.Split(new string[] { " - " }, StringSplitOptions.None)[0].Trim();
                 MessageUpdatePanel.Update();
             }
         }
     }
     catch (Exception e3)
     {
         lblErrorMessage.Text = "pWHSLPNSummary Error " + e3.Message + ", " + e3.ToString();
         MessageUpdatePanel.Update();
     }
 }
Exemplo n.º 4
0
    protected void PrintLabel_Click(object sender, EventArgs e)
    {
        try
        {
            string LabelLoc = "file:" + lblFormat.Text.ToString();
            //btFormat = btApp.Formats.Open(@"\\pfcdev\ftp\EDIPallet.btw", false, "");
            ////btFormat = btApp.Formats.Open(lblFormat.Text.ToString(), true, "");
            //btBases = btFormat.Databases;
            //btQueryPrompts = btBases.QueryPrompts;
            //btPrompt = btQueryPrompts.GetQueryPrompt("WarehouseOrderNumber");
            //btPrompt.Value = hidOrderNo.Value.ToString();
            //btFormat.PrintOut(true, true);
            //btFormat.Close(BarTender.BtSaveOptions.btDoNotSaveChanges);
            lblSuccessMessage.Text = "Printing Complete.";
            updpnlSelector.Visible = true;
            SearchSubmit.Visible   = true;
            updpnlSelector.Update();
            updpnlOrder.Visible = false;
            PrintLabel.Visible  = false;
            PrintCancel.Visible = false;
            updpnlOrder.Update();
            //ScriptManager.RegisterClientScriptBlock(PrintLabel, PrintLabel.GetType(), "ShowLabel", "OpenLabel('" + LabelLoc + "');", true);

            //           Response.Redirect(LabelLoc, true);
        }
        catch (Exception e3)
        {
            lblErrorMessage.Text = "Error " + e3.ToString();
            MessageUpdatePanel.Update();
        }
    }
Exemplo n.º 5
0
 public void SortDetailGrid(Object sender, GridViewSortEventArgs e)
 {
     try
     {
         // Create a DataView
         if (Session["FilteredRcptData"] == null)
         {
             dv = new DataView((DataTable)Session["LPNRcptData"]);
         }
         else
         {
             dv = new DataView((DataTable)Session["FilteredRcptData"]);
         }
         SortHidden.Value = e.SortExpression;
         dv.Sort          = e.SortExpression;
         dt = dv.ToTable();
         RePage(dt);
         if (Session["FilteredRcptData"] == null)
         {
             Session["LPNRcptData"] = dt;
         }
         else
         {
             Session["FilteredRcptData"] = dt;
         }
         BindPageDetails();
     }
     catch (Exception e2)
     {
         lblErrorMessage.Text = "Sort Error " + e2.Message + ", " + e2.ToString();
         MessageUpdatePanel.Update();
     }
 }
Exemplo n.º 6
0
 protected void DetailRowBound(Object sender, GridViewRowEventArgs e)
 {
     try
     {
         // show availability link if QOH less than requested
         row = e.Row;
         if (row.RowType == DataControlRowType.DataRow)
         {
             LineSelected         = (CheckBox)row.Cells[0].Controls[1];
             LineSelected.Enabled = false;
         }
         if ((row.RowType == DataControlRowType.DataRow) || (row.RowType == DataControlRowType.Header))
         {
             // line formatting
             if (Prog.Value == "BinRec")
             {
                 row.Cells[4].Visible = false;
             }
             else
             {
                 row.Cells[5].Visible = false;
             }
         }
     }
     catch (Exception e2)
     {
         lblErrorMessage.Text = "FillGrid Error " + e2.Message + ", " + e2.ToString();
         MessageUpdatePanel.Update();
     }
 }
Exemplo n.º 7
0
 protected void DetailRowBound(Object sender, GridViewRowEventArgs e)
 {
     try
     {
         // show availability link on Branch 40
         row = e.Row;
         if (row.RowType == DataControlRowType.DataRow)
         {
             // line formatting
             if (row.Cells[0].Text == "40")
             {
                 row.Cells[0].Text = "<span class='QOHLink' onClick='OpenVirtualAvailability(40);' style='cursor: hand;'>" + row.Cells[0].Text + "</span>";
                 row.Cells[1].Text = "<span class='QOHLink' onClick='OpenVirtualAvailability(40);' style='cursor: hand;'>" + row.Cells[1].Text + "</span>";
             }
             else if (row.Cells[0].Text.ToUpper() == "V")
             {
                 row.Font.Bold = true;
                 TextBox txtReqQty = row.FindControl("BranchQtyTextBox") as TextBox;
                 txtReqQty.Visible = false;
             }
         }
     }
     catch (Exception e2)
     {
         lblErrorMessage.Text = "DetailRowBound Error " + e2.Message;
         MessageUpdatePanel.Update();
     }
 }
Exemplo n.º 8
0
 protected void FTP_Click(object sender, EventArgs e)
 {
     lblErrorMessage.Text   = "";
     lblSuccessMessage.Text = "";
     if (txtFTPSite.Text.ToString().Trim().Length == 0)
     {
         lblErrorMessage.Text = "An FTP Site Address required.";
     }
     else
     {
         try
         {
             int POCtr = 0;
             dt = (DataTable)Session["PIXmlData"];
             foreach (DataRow header in (dt.Rows))
             {
                 XmlFileName = @"XML/PFC_Order_" + header["PONum"].ToString().Trim() + ".xml";
                 fullpath    = Request.MapPath(XmlFileName);
                 SendFile(txtFTPSite.Text.ToString().Trim(),
                          @"PFC_Order_" + header["PONum"].ToString().Trim() + ".xml",
                          txtFTPUser.Text.ToString().Trim(),
                          txtFTPPassword.Text.ToString().Trim(),
                          fullpath.Trim());
                 POCtr++;
             }
             lblSuccessMessage.Text = POCtr.ToString() + " files have been sent to " + txtFTPSite.Text.ToString().Trim() + ".";
             FTPUpdatePanel.Visible = false;
         }
         catch (Exception e3)
         {
             lblErrorMessage.Text = "FTP_Click Error " + e3.ToString();
         }
     }
     MessageUpdatePanel.Update();
 }
Exemplo n.º 9
0
 protected void DetailRowBound(Object sender, GridViewRowEventArgs e)
 {
     try
     {
         // set the detail link DataFormatString="{0:MM/dd/yyyy}"
         row = e.Row;
         if (row.RowType == DataControlRowType.DataRow)
         {
             ContainerLink = (LinkButton)row.Cells[0].Controls[1];
             // line formatting
             if ((row.Cells[6].Text.ToString().Trim() != "&nbsp;") && (row.Cells[6].Text.ToString().Trim() != Session["UserName"].ToString().Trim()))
             {
                 ContainerLink.Enabled = false;
             }
             else
             {
                 string LinkCommand = "";
                 LinkCommand  = "return OpenDetail('";
                 LinkCommand += ContainerLink.Text + "');";
                 ContainerLink.OnClientClick = LinkCommand;
             }
         }
     }
     catch (Exception e2)
     {
         lblErrorMessage.Text = "DetailRowBound Error " + e2.Message + ", " + e2.ToString();
         MessageUpdatePanel.Update();
     }
 }
Exemplo n.º 10
0
    protected void CheckZItemBranch(string BranchToCheck)
    {
        // This retrieves whether ZItem should be process using field ItemPromptInd
        DataTable dtLoc = new DataTable();
        DataSet   dsLoc = SqlHelper.ExecuteDataset(connectionString, "pSOEGetLocMaster",
                                                   new SqlParameter("@LocNo", BranchToCheck));

        if (dsLoc.Tables.Count >= 1)
        {
            if (dsLoc.Tables.Count == 1)
            {
                // We only go one table back, something is wrong
                dtLoc = dsLoc.Tables[0];
                if (dtLoc.Rows.Count > 0)
                {
                    lblErrorMessage.Text = "ZItem Problem with Branch " + BranchToCheck.ToString();
                    MessageUpdatePanel.Update();
                }
            }
            else
            {
                dtLoc = dsLoc.Tables[1];
                if (dtLoc.Rows.Count > 0)
                {
                    ItemPromptInd.Value = dtLoc.Rows[0]["ItemPromptInd"].ToString();
                }
            }
        }
    }
Exemplo n.º 11
0
 protected void GetItemHistory(string ItemNo, string CustNo)
 {
     // get the history data.
     ds = SqlHelper.ExecuteDataset(connectionString, "pSOEGetItemHist",
                                   new SqlParameter("@SearchItemNo", ItemNo),
                                   new SqlParameter("@Organization", CustNo),
                                   new SqlParameter("@HistoryType", "Summary"),
                                   new SqlParameter("@operateMode", ""));
     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.Count > 0)
             {
                 lblErrorMessage.Text = "History problem " + ItemNo.ToString() + CustNo.ToString();
                 MessageUpdatePanel.Update();
             }
         }
         else
         {
             dt = ds.Tables[1];
             HistoryGridView.DataSource = dt;
             HistoryGridView.DataBind();
             HistoryUpdatePanel.Update();
             if (dt.Rows.Count == 0)
             {
                 lblSuccessMessage.Text = "No History Found.";
                 MessageUpdatePanel.Update();
             }
         }
     }
 }
Exemplo n.º 12
0
 protected void GetLPNData()
 {
     try
     {
         Session[SessionTableName] = null;
         // get the data.
         dt = CheckError(ReceiptData.GetItems(LPNLabel.Text.ToString().Trim(), Session["UserName"].ToString()));
         if ((dt != null) && (dt.Rows.Count > 0))
         {
             LPNGridView.DataSource = dt;
             LPNGridView.DataBind();
             Session[SessionTableName] = dt;
             lblSuccessMessage.Text    = "Cross Dock Orders have been submitted for Printing.";
         }
         else
         {
             lblErrorMessage.Text = "No data for LPN " + LPNLabel.Text;
             MessageUpdatePanel.Update();
         }
     }
     catch (Exception e3)
     {
         lblErrorMessage.Text = "GetLPNData Error " + e3.Message + ", " + e3.ToString();
         MessageUpdatePanel.Update();
     }
 }
Exemplo n.º 13
0
 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;
 }
Exemplo n.º 14
0
    public void SortDetailGrid(Object sender, GridViewSortEventArgs e)
    {
        try
        {
            if (hidSort.Attributes["sortType"] != null)
            {
                if (hidSort.Attributes["sortType"].ToString() == "ASC")
                {
                    hidSort.Attributes["sortType"] = "DESC";
                }
                else
                {
                    hidSort.Attributes["sortType"] = "ASC";
                }
            }
            else
            {
                hidSort.Attributes.Add("sortType", "DESC");
            }

            hidSort.Value = e.SortExpression + " " + hidSort.Attributes["sortType"].ToString();

            dt = (DataTable)Session["BSSData"];
            DataView dv = new DataView(dt, hidRowFilter.Value.ToString(), hidSort.Value.ToString(), DataViewRowState.CurrentRows);
            BSSGridView.DataSource = dv;
            BSSGridView.DataBind();
            DetailGridPanel.Height = new Unit(double.Parse(DetailGridHeightHidden.Value), UnitType.Pixel);
            DetailGridPanel.Width  = new Unit(double.Parse(DetailGridWidthHidden.Value), UnitType.Pixel);
        }
        catch (Exception e2)
        {
            lblErrorMessage.Text = "Sort Error " + e2.Message + ", " + e2.ToString();
            MessageUpdatePanel.Update();
        }
    }
Exemplo n.º 15
0
 protected void Update_Click(object sender, EventArgs e)
 {
     try
     {
         lblErrorMessage.Text = "";
         CheckData();
         if (lblErrorMessage.Text.ToString().Trim().Length == 0)
         {
             dt = CheckError(PIData.FixCatData(
                                 txtVendor.Text.ToString().Trim()
                                 , txtBegCat.Text.ToString().Trim()
                                 , txtEndCat.Text.ToString().Trim()
                                 , txtFileName.Text.ToString().Trim()
                                 , hidRecID.Value.ToString()
                                 , Session["UserName"].ToString()
                                 ));
             ShowData();
             ClearData();
         }
         MessageUpdatePanel.Update();
     }
     catch (Exception e3)
     {
         lblErrorMessage.Text = "Update_Click Error " + e3.ToString();
         MessageUpdatePanel.Update();
     }
 }
Exemplo n.º 16
0
 public void SortDetailGrid(Object sender, GridViewSortEventArgs e)
 {
     try
     {
         // Create a DataView
         if (Session["FilteredXDocData"] == null)
         {
             dv = new DataView((DataTable)Session["XDocData"]);
         }
         else
         {
             dv = new DataView((DataTable)Session["FilteredXDocData"]);
         }
         SortHidden.Value = e.SortExpression;
         dv.Sort          = e.SortExpression;
         dt = dv.ToTable();
         RePage(dt);
         if (Session["FilteredXDocData"] == null)
         {
             Session["XDocData"] = dt;
         }
         else
         {
             Session["FilteredXDocData"] = dt;
         }
         BindPageDetails();
         //DetailGridPanel.Height = new Unit(double.Parse(DetailGridHeightHidden.Value), UnitType.Pixel);
         //DetailGridPanel.Width = new Unit(double.Parse(DetailGridWidthHidden.Value), UnitType.Pixel);
     }
     catch (Exception e2)
     {
         lblErrorMessage.Text = "Sort Error " + e2.Message + ", " + e2.ToString();
         MessageUpdatePanel.Update();
     }
 }
Exemplo n.º 17
0
 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();
     }
 }
Exemplo n.º 18
0
 public void BindPageDetails()
 {
     try
     {
         lblCurrentPageRecCount.Text = " " + (ddlPages.SelectedIndex + 1).ToString();
         lblTotalNoOfRec.Text        = " " + ddlPages.Items.Count.ToString();
         lblCurrentPage.Text         = " " + (ddlPages.SelectedIndex + 1).ToString();
         lblTotalPage.Text           = " " + ddlPages.Items.Count.ToString();
         lblCurrentTotalRec.Text     = " " + (ddlPages.SelectedIndex + 1).ToString();
         pnlPager.Update();
         // see if page has been filtered
         if (Session["FilteredRcptData"] == null)
         {
             dv = new DataView((DataTable)Session["LPNRcptData"], "PageNo = " + (ddlPages.SelectedIndex + 1).ToString(),
                               SortHidden.Value, DataViewRowState.CurrentRows);
         }
         else
         {
             dv = new DataView((DataTable)Session["FilteredRcptData"], "PageNo = " + (ddlPages.SelectedIndex + 1).ToString(),
                               SortHidden.Value, DataViewRowState.CurrentRows);
         }
         XDocGridView.DataSource = dv;
         XDocGridView.DataBind();
     }
     catch (Exception e3)
     {
         lblErrorMessage.Text = "BindPageDetails Error " + e3.ToString();
         MessageUpdatePanel.Update();
     }
 }
Exemplo n.º 19
0
 protected void GetPackPlateData(string ItemNo, string Loc)
 {
     Loc = Loc.PadLeft(2, '0');
     // set the z-item on the location
     CheckZItemBranch(Loc);
     // get the package and plating data.
     ds = SqlHelper.ExecuteDataset(connectionString, "pSOEGetPackPlate",
                                   new SqlParameter("@SearchItemNo", ItemNo),
                                   new SqlParameter("@PrimaryBranch", Loc));
     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.Count > 0)
             {
                 lblErrorMessage.Text = "Package/Plating problem " + ItemNo.ToString() + Loc.ToString();
                 MessageUpdatePanel.Update();
             }
         }
         else
         {
             dt = ds.Tables[1];
             if (dt.Rows.Count > 0)
             {
                 if (WebEnabledHidden.Value == "1")
                 {
                     DataView dvWE = new DataView(dt, "WebEnabled = '" + WebEnabledHidden.Value + "'", "", DataViewRowState.CurrentRows);
                     PackPlateGridView.DataSource = dvWE;
                 }
                 else
                 {
                     PackPlateGridView.DataSource = dt;
                 }
                 PackPlateGridView.DataBind();
                 PackPlateUpdatePanel.Update();
                 DataView dv = new DataView(dt, "SubItem = '" + ItemNo + "'", "", DataViewRowState.CurrentRows);
                 if (dv.Count > 0)
                 {
                     AltAvailLabel.Text = String.Format("{0:#,##0}", dv[0]["AltQOH"]);
                 }
                 else
                 {
                     AltAvailLabel.Text = "0";
                 }
                 BindPrintDialog();
             }
             else
             {
                 AltAvailLabel.Text = "";
                 PackPlateGridView.DataBind();
                 PackPlateUpdatePanel.Update();
                 lblErrorMessage.Text = "Nothing on file.";
                 MessageUpdatePanel.Update();
             }
         }
     }
 }
Exemplo n.º 20
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Print.Visible = false;
     }
     lblErrorMessage.Text   = "";
     lblSuccessMessage.Text = "";
     MessageUpdatePanel.Update();
 }
Exemplo n.º 21
0
 protected void PackPlateSubmit_Click(object sender, EventArgs e)
 {
     lblErrorMessage.Text = "";
     MessageUpdatePanel.Update();
     GetPackPlateData(ItemNoTextBox.Text, ReqLocTextBox.Text);
     ReqQtyLabel.Text   = ReqQtyHidden.Value;
     AltQtyLabel.Text   = AltQtyHidden.Value;
     ReqAvailLabel.Text = ReqAvailHidden.Value;
     PackPlateScriptManager.SetFocus("ItemNoTextBox");
 }
Exemplo n.º 22
0
 protected void GetLPNData()
 {
     try
     {
         // get the data.
         ds = SqlHelper.ExecuteDataset(ERPConnectionString, "pWHSLPNDetail",
                                       new SqlParameter("@Branch", LocLabel.Text.Substring(0, 2)),
                                       new SqlParameter("@LPN", LPNLabel.Text.Trim()));
         if (ds.Tables.Count == 1)
         {
             dt = ds.Tables[0];
             if (dt.Rows.Count > 0)
             {
                 DataColumn column = new DataColumn();
                 column.DataType     = Type.GetType("System.Boolean");
                 column.ColumnName   = "Adjust";
                 column.Caption      = "Select";
                 column.ReadOnly     = false;
                 column.Unique       = false;
                 column.DefaultValue = false;
                 dt.Columns.Add(column);
                 DataColumn column2 = new DataColumn();
                 column2.DataType   = Type.GetType("System.String");
                 column2.ColumnName = "AdjustDesc";
                 //column.Caption = "Select";
                 column2.ReadOnly     = false;
                 column2.Unique       = false;
                 column2.DefaultValue = "None";
                 dt.Columns.Add(column2);
                 DataColumn column3 = new DataColumn();
                 column3.DataType     = Type.GetType("System.Int16");
                 column3.ColumnName   = "AdjustQty";
                 column3.Caption      = "AdjustQty";
                 column3.ReadOnly     = false;
                 column3.Unique       = false;
                 column3.DefaultValue = 0;
                 dt.Columns.Add(column3);
                 LPNGridView.DataSource = dt;
                 LPNGridView.DataBind();
                 Session[SessionTableName] = dt;
             }
             else
             {
                 lblErrorMessage.Text = "No data for LPN " + LPNLabel.Text;
                 MessageUpdatePanel.Update();
             }
         }
     }
     catch (Exception e3)
     {
         lblErrorMessage.Text = "pWHSLPNDetail Error " + e3.Message + ", " + e3.ToString();
         MessageUpdatePanel.Update();
     }
 }
Exemplo n.º 23
0
 protected void Submit_Click(object sender, EventArgs e)
 {
     if ((ContainerTextBox.Text.Trim().Length == 0) && (LPNTextBox.Text.Trim().Length == 0))
     {
         lblErrorMessage.Text = "Please enter a Container or LPN number.";
         MessageUpdatePanel.Update();
     }
     else
     {
         GetData();
     }
 }
Exemplo n.º 24
0
    protected void GetQuoteData()
    {
        int AltQtyReq = 0;

        // get the matching quote data.
        ds = SqlHelper.ExecuteDataset(connectionString, "pSOEGetQuotes",
                                      new SqlParameter("@Organization", ""),
                                      new SqlParameter("@QuoteFilterField", ItemNoTextBox.Text),
                                      new SqlParameter("@QuoteFilterValue", QuoteFilterValueHidden.Value),
                                      new SqlParameter("@FreshQOH", QOHCommandHidden.Value));
        if (ds.Tables.Count <= 1)
        {
            // We only go one table back, something is wrong
            lblErrorMessage.Text = "Quote Recall Quote Lines problem " + QuoteNumber.Value;
            MessageUpdatePanel.Update();
            return;
        }
        dt = ds.Tables[1];
        if (dt.Rows.Count > 0)
        {
            SellStkQty.Value = dt.Rows[0]["SellStkUMQty"].ToString();
            SellStkUOM.Value = dt.Rows[0]["SellStkUM"].ToString();
            object sumObjectRemote;
            sumObjectRemote = dt.Compute("Sum(RemoteQty)", "1 = 1");
            // if there is more than one line for the same item, override the requested qtys
            if (int.Parse(sumObjectRemote.ToString()) > int.Parse(ReqQtyHidden.Value))
            {
                ReqQtyHidden.Value = string.Format("{0:#########0}", sumObjectRemote);
                AltQtyReq          = int.Parse(dt.Rows[0]["SellStkUMQty"].ToString());
                AltQtyReq          = AltQtyReq * int.Parse(sumObjectRemote.ToString());
                AltQtyHidden.Value = AltQtyReq.ToString();
                ReqQtyLabel.Text   = ReqQtyHidden.Value;
                AltQtyLabel.Text   = AltQtyHidden.Value;
            }
            AltQtyHidden.Value = String.Format(Num0Format, int.Parse(ReqQtyHidden.Value) * int.Parse(SellStkQty.Value));
            AltQtyLabel.Text   = AltQtyHidden.Value;
            object sumObjectAvail;
            sumObjectAvail       = dt.Compute("Sum(QOH)", "1 = 1");
            ReqAvailHidden.Value = string.Format("{0:#########0}", sumObjectAvail);
            ReqAvailLabel.Text   = ReqAvailHidden.Value;
            AltAvailLabel.Text   = String.Format(Num0Format, int.Parse(ReqAvailHidden.Value) * int.Parse(SellStkQty.Value));
        }
        else
        {
            //lblErrorMessage.Text = "Error " + ItemNoTextBox.Text + ":" + QuoteFilterValueHidden.Value + ":" + QOHCommandHidden.Value;
            lblErrorMessage.Text = "No Availability at any Branch";
            MessageUpdatePanel.Update();
        }
        BranchQOHGrid.DataSource = ds.Tables[1];
        BranchQOHGrid.DataBind();
        BranchUpdatePanel.Update();
    }
Exemplo n.º 25
0
 public DataTable CheckError(DataTable NewData)
 {
     if ((NewData != null) && (NewData.Columns.Contains("ErrorType")))
     {
         lblErrorMessage.Text = NewData.Rows[0]["ErrorText"].ToString();
         MessageUpdatePanel.Update();
         return(null);
     }
     else
     {
         return(NewData);
     }
 }
Exemplo n.º 26
0
 protected void Search(object sender, EventArgs e)
 {
     if (SONumberTextBox.Text.Trim().Length == 0)
     {
         ShowPageMessage("You must enter a Released Order number. ", 2);
         MessageUpdatePanel.Update();
     }
     else
     {
         // get the document
         GetDocument(SONumberTextBox.Text);
     }
 }
Exemplo n.º 27
0
 protected void Search(object sender, EventArgs e)
 {
     if (InvoiceNoTextBox.Text.Trim().Length == 0 && SONumberTextBox.Text.Trim().Length == 0)
     {
         ShowPageMessage("You must enter either an Invoice or Sales Order number. ", 2);
         MessageUpdatePanel.Update();
     }
     else
     {
         // get the document
         GetDocument(InvoiceNoTextBox.Text, SONumberTextBox.Text);
     }
 }
Exemplo n.º 28
0
    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);
    }
Exemplo n.º 29
0
 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;
 }
Exemplo n.º 30
0
    public void GetImages(string Category)
    {
        string HeaderImageName = "";
        string BodyImageName   = "";
        //show the item images
        string ColumnNames = "";

        ColumnNames  = "Category ,";
        ColumnNames += "TechSpec,";
        ColumnNames += "Caution,";
        ColumnNames += "BodyFileName,";
        ColumnNames += "HeadFileName";
        DataSet dsImage = SqlHelper.ExecuteDataset(connectionString, "UGEN_SP_Select",
                                                   new SqlParameter("@tableName", "ItemCategory WITH (NOLOCK)"),
                                                   new SqlParameter("@columnNames", ColumnNames),
                                                   new SqlParameter("@whereClause", "Category='" + Category + "'"));

        if (dsImage.Tables.Count == 1)
        {
            // We only got one table back
            DataTable dtImage = dsImage.Tables[0];
            if (dtImage.Rows.Count > 0)
            {
                CategorySpecLabel.Text = dtImage.Rows[0]["TechSpec"].ToString();
                if (CategorySpecLabel.Text.Length > 1)
                {
                    CategorySpecLabel.Text = "Specification: " + CategorySpecLabel.Text;
                    MessageUpdatePanel.Update();
                }
                BodyImageName      = dtImage.Rows[0]["BodyFileName"].ToString();
                HeaderImageName    = dtImage.Rows[0]["HeadFileName"].ToString();
                BodyImage.ImageUrl = ImageLibrary + BodyImageName;
                HeadImage.ImageUrl = ImageLibrary + HeaderImageName;
                HeadImageUpdatePanel.Update();
                BodyImageUpdatePanel.Update();
                HeadImageUpdatePanel.Visible = true;
                BodyImageUpdatePanel.Visible = true;
            }
            else
            {
                ShowPageMessage(Category + " Not Found for Image", 2);
            }
        }
        else
        {
            ShowPageMessage(Category + " Not Found for Image", 2);
        }
    }