コード例 #1
0
    public string LoadComponentSmv(int BuyerId, string StyleNumber)
    {
        BulkSmvBLL bulkBll = new BulkSmvBLL();

        try
        {
            bulkTable = bulkBll.LoadComponentSmv(BuyerId, StyleNumber);
        }
        catch (Exception ex)
        {
        }
        return(bulkTable);
    }
コード例 #2
0
    protected string LoadBuyersStyleInfoFromBulk(string fromDate, string toDate)
    {
        string table = "";

        try
        {
            table = new BulkSmvBLL().LoadBuyersStyleInfoFromBulk(fromDate, toDate);
        }
        catch (Exception ex)
        {
        }
        return(table);
    }
コード例 #3
0
    public string LoadRevisedBulkSmvinformation(int buyerId, string styleNumber)
    {
        BulkSmvBLL smvBll = new BulkSmvBLL();

        try
        {
            bulkSmvTable = smvBll.LoadRevisedBulkSmvInfo(buyerId, styleNumber);
        }
        catch (Exception ex)
        {
        }
        return(bulkSmvTable);
    }
コード例 #4
0
    public string LoadBulkSmvReport(int buyerId, string styleNumber)
    {
        BulkSmvBLL bulkBll = new BulkSmvBLL();

        try
        {
            bulkTable = bulkBll.LoadBulkSmvReports(buyerId, styleNumber);
        }
        catch (Exception ex)
        {
        }
        return(bulkTable);
    }
コード例 #5
0
    protected void updateButton_Click(object sender, EventArgs e)
    {
        DataTable dt = new DataTable();

        try
        {
            int        value      = 0;
            BulkSmv    bulk       = new BulkSmv();
            BulkSmvBLL bulkSmvBLL = new BulkSmvBLL();
            MailClass  mailClass  = new MailClass();

            bulk.BuyerId = Convert.ToInt32(buyerNameDropDownList.SelectedValue);

            value = Convert.ToInt32(sampleStageHiddenField.Value);
            bulk.SampleStageId = value;

            bulk.FabricId = Convert.ToInt32(fabricDropDownList.SelectedValue);
            //bulk.StyleId= Convert.ToInt32(styleDropDownList.SelectedValue);
            bulk.StyleNumber      = styleNumberTextBox.Text.Trim();
            bulk.StyleDescription = styleDescriptionTextBox.Text;
            bulk.ProductCategory  = Convert.ToInt32(ProductDropDownList.SelectedValue);
            //bulk.WorkUpdate = remarksTextArea.InnerText;
            //bulk.SampleDate = sampleDateTextBox.Text;
            //bulk.SeasonId= SeasonDropDownList.SelectedValue;
            bulk.SeasonId = seasonTextBox.Text.Trim();


            if (sampleDateTextBox.Text == "1900-01-01")
            {
                bulk.SampleDate = Convert.ToString("");
            }
            else
            {
                bulk.SampleDate = Convert.ToString(sampleDateTextBox.Text);
            }

            bulk.MachineWork = machineDetailsTextarea.InnerText;
            bulk.Description = descriptionTextarea.InnerText;

            if (sewingTextBox.Text == "" || sewingTextBox.Text == null)
            {
                bulk.SewingSmv = Convert.ToDecimal("0.00");
            }
            else
            {
                bulk.SewingSmv = Convert.ToDecimal(sewingTextBox.Text);
            }

            if (fitsTextBox.Text == "" || fitsTextBox.Text == null)
            {
                bulk.FitsSmv = Convert.ToDecimal("0.00");
            }
            else
            {
                bulk.FitsSmv = Convert.ToDecimal(fitsTextBox.Text);
            }

            if (overlayTextBox.Text == "" || overlayTextBox == null)
            {
                bulk.OverlaySmv = Convert.ToDecimal("0.00");
            }
            else
            {
                bulk.OverlaySmv = Convert.ToDecimal(overlayTextBox.Text);
            }


            if (plkTextBox.Text == "" || plkTextBox.Text == null)
            {
                bulk.PlkQuilting = Convert.ToDecimal("0.00");
            }
            else
            {
                bulk.PlkQuilting = Convert.ToDecimal(plkTextBox.Text);
            }

            if (autoTextBox.Text == "" || autoTextBox.Text == null)
            {
                bulk.AutoQuilting = Convert.ToDecimal("0.00");
            }
            else
            {
                bulk.AutoQuilting = Convert.ToDecimal(autoTextBox.Text);
            }
            if (quiltingManualTextBox.Text == "" || quiltingManualTextBox.Text == null)
            {
                bulk.ManualQuilting = Convert.ToDecimal("0.00");
            }
            else
            {
                bulk.ManualQuilting = Convert.ToDecimal(quiltingManualTextBox.Text);
            }

            if (downManualTextBox.Text == "" || downManualTextBox.Text == null)
            {
                bulk.ManualDownFill = Convert.ToDecimal("0.00");
            }
            else
            {
                bulk.ManualDownFill = Convert.ToDecimal(downManualTextBox.Text);
            }

            if (downMachineTextBox.Text == "" || downMachineTextBox.Text == null)
            {
                bulk.MachineDownFill = Convert.ToDecimal("0.00");
            }
            else
            {
                bulk.MachineDownFill = Convert.ToDecimal(downMachineTextBox.Text);
            }

            if (finishingTextBox.Text == "" || finishingTextBox.Text == null)
            {
                bulk.FinishingSmv = Convert.ToDecimal("0.00");
            }
            else
            {
                bulk.FinishingSmv = Convert.ToDecimal(finishingTextBox.Text);
            }


            bulk.ReviewBy   = Convert.ToInt32(reviewDropDownList.SelectedValue);
            bulk.ApprovedBy = Convert.ToInt32(approvedDropDownList.SelectedValue);


            if (bulkSmvId != 0)
            {
                bulk.BulkSmvId = bulkSmvId;
                bulk.UpdatedBy = Convert.ToInt32(userId);
                actionResult   = bulkSmvBLL.UpdateBulkSmv(bulk);


                if (actionResult >= 1)
                {
                    if (bulk.ApprovedBy == 0)
                    {
                        mailClass.SendMailForApprovedByNotSetOfBulk(bulk);
                    }
                    messageLabel.Text = "<p Style ='font-size:20px;color:Green; margin-top:20px;'> Information Successfully Updated</p>";
                    ClearAllData();
                    Page.Response.Redirect(url.ToString(), true);
                }
                else
                {
                    messageLabel.Text = "<p Style ='font-size:20px;color:Red; margin-top:20px;'>Already Exists...</p>";
                }
            }
        }
        catch (Exception ex)
        {
        }
        table            = LoadRevisedBulkSmvinformation(buyerId, styleNumber);
        mainBody.Visible = false;
    }
コード例 #6
0
    public void LoadBuklSmvForRevised(int BulkId)
    {
        int buyerIdForLoad = 0;

        try
        {
            BulkSmvBLL bulkSmvBLL = new BulkSmvBLL();

            DataTable dt = bulkSmvBLL.LoadCostingInfoInfoForUpdate(BulkId);

            if (dt.Rows.Count > 0)
            {
                buyerNameDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["BuyerId"]);
                buyerIdForLoad = Convert.ToInt32(dt.Rows[0]["BuyerId"]);
                string value = Convert.ToString(dt.Rows[0]["SampleStageId"]);
                sampleStageHiddenField.Value = value;

                loadSampleStageForUpdate(buyerIdForLoad);

                sampleStageDropDownList.SelectedValue = sampleStageHiddenField.Value;
                fabricDropDownList.SelectedValue      = Convert.ToString(dt.Rows[0]["FabricId"]);
                //styleDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["StyleId"]);


                styleNumberTextBox.Text      = Convert.ToString(dt.Rows[0]["StyleNumber"]);
                styleDescriptionTextBox.Text = Convert.ToString(dt.Rows[0]["StyleDescription"]);

                ProductDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["ProductCategory"]);
                //SeasonDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["SeasonId"]);
                seasonTextBox.Text = Convert.ToString(dt.Rows[0]["SeasonId"]);
                //sewingTextBox.Text = Convert.ToString(dt.Rows[0]["SewingSmv"]);
                //overlayTextBox.Text = Convert.ToString(dt.Rows[0]["OverlaySmv"]);
                //fitsTextBox.Text = Convert.ToString(dt.Rows[0]["FitsSmv"]);

                //plkTextBox.Text = Convert.ToString(dt.Rows[0]["PlkQuelting"]);
                //autoTextBox.Text = Convert.ToString(dt.Rows[0]["AutoQuelting"]);
                //quiltingManualTextBox.Text = Convert.ToString(dt.Rows[0]["ManualQuelting"]);

                //downManualTextBox.Text = Convert.ToString(dt.Rows[0]["ManualDownfill"]);
                //downMachineTextBox.Text = Convert.ToString(dt.Rows[0]["MachineDownfill"]);
                //finishingTextBox.Text = Convert.ToString(dt.Rows[0]["FinishingSmv"]);


                //approvedDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["ApprovedBy"]);
                //reviewDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["ReviewBy"]);

                //ProductDropDownList.SelectedValue = Convert.ToString(dt.Rows[0]["ProductCategory"]);

                //DateTime date = Convert.ToDateTime(dt.Rows[0]["SampleDate"]);


                //if (date.ToString("yyyy-MM-dd") == "1900-01-01")
                //{
                //    sampleDateTextBox.Text = "";
                //}
                //else
                //{
                //    sampleDateTextBox.Text = date.ToString("yyyy-MM-dd");
                //}

                ////sampleDateTextBox.Text= Convert.ToString(dt.Rows[0]["SampleDate"]);
                ////remarksTextArea.InnerText= Convert.ToString(dt.Rows[0]["WorkUpdate"]);
                //machineDetailsTextarea.InnerText = Convert.ToString(dt.Rows[0]["MachineWork"]);
                //descriptionTextarea.InnerText = Convert.ToString(dt.Rows[0]["Description"]);

                // submitButton.Text = "Correction";

                //buyerNameDropDownList.Enabled = false;
                //sampleStageDropDownList.Enabled = false;
                //styleDropDownList.Enabled = false;
                //fabricDropDownList.Enabled = false;
            }
        }
        catch (Exception ex)
        {
        }
    }