Beispiel #1
0
 protected void ItemButt_Click(object sender, EventArgs e)
 {
     try
     {
         // here we are checking for pfc part number with z-item processing
         ClearPageMessages();
         ClearItemData(true);
         // try to find the item.
         GetItem(ItemNoTextBox.Text);
         ScriptManager.RegisterClientScriptBlock(ItemNoTextBox, ItemNoTextBox.GetType(), "resize", "SetHeight();", true);
     }
     catch (Exception ex1)
     {
         ShowPageMessage("Get Item Error " + ex1.Message + ", " + ex1.ToString(), 2);
     }
 }
Beispiel #2
0
    protected void QuoteFilledButt_Click(object sender, EventArgs e)
    {
        int         RemoteQty    = 0;
        string      CloneQuoteNo = "";
        HiddenField hid;

        // flag all lines as deleted for quote/item combo
        // then add new lines for lines that have a remote qty > 0
        SqlHelper.ExecuteNonQuery(connectionString, "UGEN_SP_Update",
                                  new SqlParameter("@tableName", "DTQ_CustomerQuotation"),
                                  new SqlParameter("@columnNames", "DeleteFlag=1, DeleteDt=getdate()"),
                                  new SqlParameter("@whereClause", "SessionID='" + QuoteNumber.Value.Trim() + "' and PFCItemNo='" + ItemNoTextBox.Text.Trim() + "'"));

        foreach (TableRow tr in BranchQOHGrid.Rows)
        {
            RemoteQty = 0;
            // get remote qty
            TextBox tb = (TextBox)tr.Cells[4].Controls[1];
            if (int.TryParse(tb.Text, out RemoteQty))
            {
                if (RemoteQty > 0)
                {
                    // clone each line with a remote qty to a new line
                    SqlHelper.ExecuteNonQuery(connectionString, "pSOECloneQuoteLine",
                                              new SqlParameter("@SessionID", QuoteNumber.Value),
                                              new SqlParameter("@ItemNumber", ItemNoTextBox.Text),
                                              new SqlParameter("@LocCode", tr.Cells[0].Text),
                                              new SqlParameter("@LocName", tr.Cells[1].Text),
                                              new SqlParameter("@UserName", Session["UserName"].ToString()),
                                              new SqlParameter("@NewReqQty", RemoteQty.ToString()),
                                              new SqlParameter("@NewQOH", tr.Cells[3].Text));
                }
            }
        }
        // updates to the table are complete, fire the javascript to refresh quote recall and close
        //BranchAvailableScriptManager.
        ScriptManager.RegisterClientScriptBlock(ItemNoTextBox, ItemNoTextBox.GetType(), "DetUpdate", "ReturnToQuoteRecall();", true);
    }