コード例 #1
0
ファイル: CatPriceSchedMaint.aspx.cs プロジェクト: 2Nifty/PFC
    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());
        }
    }
コード例 #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();
 }
コード例 #3
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();
     }
 }
コード例 #4
0
ファイル: VideoDetail.aspx.cs プロジェクト: LIYINHAI/shauke
        //回复留言
        protected void btnRply_Click(object sender, EventArgs e)
        {
            int id = Convert.ToInt32(ViewState["VideoID"]);

            if (Session["UserName"] != null)
            {
                if (Page.IsValid)
                {
                    LinkButton      btn        = (LinkButton)sender;
                    int             userid     = Convert.ToInt32(Session["UserID"]);
                    ReplyLeavewords Replywords = new ReplyLeavewords();
                    Replywords.LeaveID         = Int32.Parse((btn.Parent.FindControl("HiddenFieldComID") as HiddenField).Value);
                    Replywords.UserID          = userid;
                    Replywords.ReplyLeaContent = ((TextBox)btn.Parent.FindControl("txtReplyContent")).Text;
                    Replywords.ReplyLeaTime    = DateTime.Now;
                    int result = ReplyLeavewordsService.InsertReplyLeavewords(Replywords);
                    if (result >= 1)
                    {
                        ScriptManager.RegisterClientScriptBlock(ReplyUpdatePanel, this.GetType(), "click", "alert('回复成功')", true);
                        visibleflag = true;
                        BindMessage();
                    }
                    else
                    {
                        ScriptManager.RegisterClientScriptBlock(ReplyUpdatePanel, this.GetType(), "click", "alert('回复失败')", true);
                    }
                }
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(ReplyUpdatePanel, this.GetType(), "click", "alert('您必须先登录才能发表评论');", true);
                ScriptManager.RegisterStartupScript(ReplyUpdatePanel, MessageUpdatePanel.GetType(), "updateScript", "window.location.href='Login.aspx'", true);
            }
        }
コード例 #5
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();
     }
 }
コード例 #6
0
ファイル: VideoDetail.aspx.cs プロジェクト: LIYINHAI/shauke
        protected void btnMessage_Click(object sender, EventArgs e)
        {
            int id = Convert.ToInt32(ViewState["VideoID"]);

            if (Session["UserName"] != null)
            {
                if (Page.IsValid)
                {
                    int        userid     = Convert.ToInt32(Session["UserID"]);
                    int        videoid    = Convert.ToInt32(Request.QueryString["VideoID"]);
                    Leavewords leavewords = new Leavewords();
                    leavewords.UserID       = userid;
                    leavewords.VideoID      = videoid;
                    leavewords.LeaveContent = txtMessage.Text.Trim();
                    leavewords.LeaveTime    = DateTime.Now;
                    int result = LeavewordsService.InsertLeavewords(leavewords);
                    if (result >= 1)
                    {
                        ScriptManager.RegisterClientScriptBlock(MessageUpdatePanel, this.GetType(), "click", "alert('留言成功')", true);
                        BindMessage();
                        txtMessage.Text = "";
                    }
                    else
                    {
                        ScriptManager.RegisterClientScriptBlock(MessageUpdatePanel, this.GetType(), "click", "alert('留言失败')", true);
                    }
                }
            }
            else
            {
                ScriptManager.RegisterClientScriptBlock(MessageUpdatePanel, this.GetType(), "click", "alert('您必须先登录才能发表评论');", true);
                ScriptManager.RegisterStartupScript(MessageUpdatePanel, MessageUpdatePanel.GetType(), "updateScript", "window.location.href='Login.aspx'", true);
            }
        }
コード例 #7
0
 //发布评论
 protected void btnMessage_Click(object sender, EventArgs e)
 {
     //Session["UserID"] = 1;
     if (Session["UserName"] != null)
     {
         if (Page.IsValid)
         {
             int      UserID   = Convert.ToInt32(Session["UserID"]);
             int      ActID    = Convert.ToInt32(Request.QueryString["id"]);
             Comments Comments = new Comments();
             Comments.UserID     = UserID;
             Comments.ActID      = ActID;
             Comments.ComContent = txtMessage.Text.Trim();
             Comments.ComTime    = DateTime.Now;
             int result = CommentsService.InsertComments(Comments);
             if (result >= 1)
             {
                 ScriptManager.RegisterClientScriptBlock(MessageUpdatePanel, this.GetType(), "click", "alert('留言成功')", true);
                 BindMessage();
                 txtMessage.Text = "";
             }
             else
             {
                 ScriptManager.RegisterClientScriptBlock(MessageUpdatePanel, this.GetType(), "click", "alert('留言失败')", true);
             }
         }
     }
     else
     {
         ScriptManager.RegisterClientScriptBlock(MessageUpdatePanel, this.GetType(), "click", "alert('您必须先登录才能发表评论');", true);
         ScriptManager.RegisterStartupScript(MessageUpdatePanel, MessageUpdatePanel.GetType(), "updateScript", "window.location.href='Login.aspx'", true);
     }
 }
コード例 #8
0
ファイル: ContainerXDocSumm.aspx.cs プロジェクト: 2Nifty/PFC
 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();
     }
 }
コード例 #9
0
ファイル: ContainerXDocSumm.aspx.cs プロジェクト: 2Nifty/PFC
 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() != " ") && (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();
     }
 }
コード例 #10
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;
 }
コード例 #11
0
ファイル: PalletLabel.aspx.cs プロジェクト: 2Nifty/PFC
    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();
        }
    }
コード例 #12
0
ファイル: ItemSalesHistory.aspx.cs プロジェクト: 2Nifty/PFC
 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();
             }
         }
     }
 }
コード例 #13
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();
                }
            }
        }
    }
コード例 #14
0
ファイル: RBReceiptsLPDetail.aspx.cs プロジェクト: 2Nifty/PFC
 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();
     }
 }
コード例 #15
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();
        }
    }
コード例 #16
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();
     }
 }
コード例 #17
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();
     }
 }
コード例 #18
0
ファイル: RBReceiptsSumm.aspx.cs プロジェクト: 2Nifty/PFC
 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();
     }
 }
コード例 #19
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();
 }
コード例 #20
0
ファイル: RBRecvRprtSelector.aspx.cs プロジェクト: 2Nifty/PFC
 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();
     }
 }
コード例 #21
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();
     }
 }
コード例 #22
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();
             }
         }
     }
 }
コード例 #23
0
ファイル: RBRecvRprtSelector.aspx.cs プロジェクト: 2Nifty/PFC
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Print.Visible = false;
     }
     lblErrorMessage.Text   = "";
     lblSuccessMessage.Text = "";
     MessageUpdatePanel.Update();
 }
コード例 #24
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");
 }
コード例 #25
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();
     }
 }
コード例 #26
0
ファイル: RBRecvRprtSelector.aspx.cs プロジェクト: 2Nifty/PFC
 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();
     }
 }
コード例 #27
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();
    }
コード例 #28
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);
     }
 }
コード例 #29
0
ファイル: IntrntnlInvoice.aspx.cs プロジェクト: 2Nifty/PFC
 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);
     }
 }
コード例 #30
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);
     }
 }