Exemple #1
0
    private void SetData(PDProductData data)
    {
        this.txtLOID.Text = data.LOID.ToString();
        this.txtQCCode.Text = data.LOTNO;
        //this.txtCreateby.Text = data.CREATEBY;
        //this.txtInvNo.Text = data.INVNO;
        this.ctlQCDate.DateValue = data.SENDQCDATE;
        this.ctlAnaDate.DateValue = data.ANADATE;
        this.txtNo.Text = data.ANACODE;
        data.WAREHOUSE = Authz.CurrentUserInfo.Warehouse;

        SetPDOreder(data.PDORDER);
       // this.txtDivision.Text = FlowObj.GetDivision(data.CREATEBY);
        this.grvItem.DataSource = FlowObj.GetPDProductItem(data.LOID);

        this.grvItem.DataBind();

        if (data.PRODSTATUS == Constz.Requisition.Status.Approved.Code)
        {
            this.ctlToolbar.BtnSaveShow = false;
            this.ctlToolbar.BtnSubmitShow = false;
        }
        if (data.WAREHOUSE == 2)
        {
            this.ctlToolbar.ClientClickPrint = ABB.Global.Appz.ReportScript(Constz.Report.ProductQC, Convert.ToDouble(this.txtLOID.Text == "" ? "0" : this.txtLOID.Text)) + " return false;";
        }
        else
        {
            this.ctlToolbar.ClientClickPrint = ABB.Global.Appz.ReportScript(Constz.Report.F_FG_16_R00, Convert.ToDouble(this.txtLOID.Text == "" ? "0" : this.txtLOID.Text)) + " return false;";
        }
    }
Exemple #2
0
 public PDProductData GetData(double loid)
 {
     PDProductData data = new PDProductData();
     if (DALObj.GetDataByLOID(loid, null))
     {
         data.LOID = DALObj.LOID;
         data.PRODSTATUS = DALObj.PRODSTATUS;
         data.LOTNO = DALObj.LOTNO;
         data.CREATEBY = DALObj.CREATEBY;
         data.SENDQCDATE = DALObj.SENDQCDATE;
         data.PDORDER = DALObj.PDORDER;
         PDOrderDAL PDDAL = new PDOrderDAL();
         PDDAL.GetDataByLOID(data.PDORDER, null);
         data.ANACODE = PDDAL.ANACODE;
         data.ANADATE = PDDAL.ANADATE;
     }
     return data;
 }
    protected void btnStockOut_Click(object sender, EventArgs e)
    {
        double sqty = PDProductFlow.CheckSendFGQty(txtPdpLoid.Text.Trim());
        if (Convert.ToDouble(txtSendFgQty.Text.Trim()) > sqty)
        {
            Appz.ClientAlert(Page, "¨Ó¹Ç¹·ÕèÊè§ÍÍ¡µéͧäÁèà¡Ô¹¨Ó¹Ç¹·ÕèÃѺà¢éÒ¤Åѧ¡Ñ¡¡Ñ¹");
            return;
        }
        else
        {
            bool ret = true;
            PDProductData pdpData = new PDProductData();
            PDOrderData poData = new PDOrderData();
            poData.STATUS = "AP";
            pdpData.PRODSTATUS = "AP";
            pdpData.SENDFGDATE = (PkSendFgDate.DateValue.Year.ToString() == "1" ? DateTime.Today : PkSendFgDate.DateValue);
            pdpData.SENDFGREMARK = txtSendFgRemark.Text.Trim();
            pdpData.SENDFGQTY = Convert.ToDouble((txtSendFgQty.Text.Trim() == "" ? "0" : txtSendFgQty.Text.Trim()));

            ret = PDProductFlow.Update_StatusRD(Authz.CurrentUserInfo.UserID.ToString(), pdpData, poData, txtPdpLoid.Text.Trim(), txtPoLoid.Text.Trim());
            if (ret == true)
            {
                Appz.ClientAlert(Page, "¨èÒÂÍÍ¡¨Ò¡¤Åѧ¡Ñ¡¡Ñ¹àÃÕºÃéÍÂ");
                LoadData(txtPdpLoid.Text.Trim());
                btnStockOut.Visible = false;
            }
        }
    }
Exemple #4
0
        public static bool Update_StatusRR(string UserID, PDProductData PdpData, PDOrderData PoData, string PdpLoid, string PoLoid)
        {
            bool ret = true;
            bool rr = true;
            PDProductDAL pdDAL = new PDProductDAL();
            pdDAL.GetDataByLOID(Convert.ToDouble(PdpLoid), null);
            pdDAL.PRODSTATUS = PdpData.PRODSTATUS;
            pdDAL.RADIATERETQTY = PdpData.RADIATERETQTY;
            pdDAL.RADIATERETREMARK = PdpData.RADIATERETREMARK;
            pdDAL.RADIATERETUNIT = PdpData.RADIATERETUNIT;

            if (PdpData.RADIATERETDATE.Year.ToString() != "1" || PdpData.RADIATERETDATE.ToString() != "")
                pdDAL.RADIATERETDATE = PdpData.RADIATERETDATE;

            ret = pdDAL.UpdateCurrentData(UserID, null);
            //=========================================================//
            PDOrderDAL PoDAL = new PDOrderDAL();
            PoDAL.GetDataByLOID(Convert.ToDouble(PoLoid), null);
            string status = PoData.STATUS;
            PoDAL.STATUS = PoData.STATUS;
            rr = PoDAL.UpdateCurrentData(UserID, null);
            if (ret == true && rr == true)
                return true;
            else
                return false;
        }
Exemple #5
0
        public static bool Update_StatusRD(string UserID, PDProductData PdpData, PDOrderData PoData, string PdpLoid, string PoLoid)
        {
            bool ret = true;
            bool rr = true;
            PDProductDAL pdDAL = new PDProductDAL();
            pdDAL.GetDataByLOID(Convert.ToDouble(PdpLoid), null);
            pdDAL.PRODSTATUS  = PdpData.PRODSTATUS;

            if (PdpData.PRODSTATUS == "QS")
            {
                pdDAL.QUARANTINEQTY = PdpData.QUARANTINEQTY;
                pdDAL.QUARANTINEREMARK = PdpData.QUARANTINEREMARK;
                if (PdpData.QUARANTINEDATE.Year.ToString() != "1" & PdpData.QUARANTINEDATE.ToString() != "")
                    pdDAL.QUARANTINEDATE = PdpData.QUARANTINEDATE;
            }
            else if (PdpData.PRODSTATUS == "RD")
            { 
                pdDAL.RADIATEQTY = PdpData.RADIATEQTY;
                pdDAL.RADIATEREMARK = PdpData.RADIATEREMARK;
                pdDAL.RADIATEUNIT = PdpData.RADIATEUNIT;
                if (PdpData.RADIATEDATE.Year.ToString() != "1" & PdpData.RADIATEDATE.ToString() != "")
                    pdDAL.RADIATEDATE = PdpData.RADIATEDATE;
            }
            else if (PdpData.PRODSTATUS == "AP")
            {
                pdDAL.SENDFGREMARK = PdpData.SENDFGREMARK;
                pdDAL.SENDFGQTY = PdpData.SENDFGQTY;
                if (PdpData.SENDFGDATE.Year.ToString() != "1" & PdpData.SENDFGDATE.ToString() != "")
                    pdDAL.SENDFGDATE = PdpData.SENDFGDATE;
            }
            else if (PdpData.PRODSTATUS == "QC")
            {
                if (PdpData.SENDQCDATE.Year.ToString() != "1" & PdpData.SENDQCDATE.ToString() != "")
                    pdDAL.SENDQCDATE = PdpData.SENDQCDATE;
            }
            


            ret = pdDAL.UpdateCurrentData(UserID, null);
            //=========================================================//
            PDOrderDAL PoDAL = new PDOrderDAL();
            PoDAL.GetDataByLOID(Convert.ToDouble(PoLoid), null);
            string status = PoData.STATUS;
            PoDAL.STATUS = PoData.STATUS;
            rr = PoDAL.UpdateCurrentData(UserID, null);
            if (status == Constz.Requisition.Status.RW.Code)
                rr = PoDAL.CutStockQS(Convert.ToDouble(PoLoid), UserID ,null);
            else if (status == Constz.Requisition.Status.XRay.Code)
                rr = PoDAL.CutStockItemQS(Convert.ToDouble(PoLoid), UserID, null);
            else if (status == Constz.Requisition.Status.QC.Code || status == Constz.Requisition.Status.QS.Code)
                rr = PoDAL.CutStock(Convert.ToDouble(PoLoid), UserID, null);

            if (ret == true && rr == true)
                return true;
            else
                return false;
        }
Exemple #6
0
 public static DataTable InsertPdProduct(string UserID, PDProductData data)
 {
     double PdpLoid = 0;
     DataTable dt = new DataTable();
     PDProductDAL pDAL = new PDProductDAL();
     pDAL.LOTNO = data.LOTNO;
     pDAL.MFGDATE = data.MFGDATE;
     pDAL.PDORDER = data.PDORDER;
     pDAL.PRODUCT = data.PRODUCT;
     pDAL.BATCHSIZEUNIT = data.BATCHSIZEUNIT;
     pDAL.BATCHSIZE = data.BATCHSIZE;
     //pDAL.SENDFGDATE = DateTime.Today;
     pDAL.EXPDATE = data.EXPDATE;
     //pDAL.RADIATEDATE = DateTime.Today;
     //pDAL.RADIATERETDATE = DateTime.Today;
     //pDAL.QUARANTINEDATE = DateTime.Today;
     //pDAL.SENDFGDATE = DateTime.Today;
     //pDAL.SENDQCDATE = DateTime.Today;
     pDAL.RADIATEUNIT = data.RADIATEUNIT;
     pDAL.RADIATERETUNIT = data.RADIATEUNIT;
     pDAL.QUARANTINEUNIT = data.RADIATEUNIT;
     pDAL.STDQTY = data.STDQTY;
     pDAL.PRODSTATUS = "WA";
     pDAL.REFLOID = data.REFLOID;
     pDAL.REFTABLE = data.REFTABLE;
     pDAL.PRODUCTTYPE = data.PRODUCTTYPE;
     pDAL.TOWAREHOUSE = data.TOWAREHOUSE;
     
     bool ret = pDAL.InsertCurrentData(UserID, null);
     if (ret == true)
     {
         PdpLoid = pDAL.LOID;
         dt = GetPdProduct(PdpLoid);
         
     }
     return dt;
 }
Exemple #7
0
        public static bool UpdatePDPrdouct(string UserID, PDProductData data)
        {
            bool ret = true;
            PDProductDAL pDAL = new PDProductDAL();
            //### ProductFill
            pDAL.GetDataByLOID(data.LOID, null);
            pDAL.PACKING = data.PACKING.ToString();
            pDAL.PACKAGE = data.PACKAGE.ToString();
            pDAL.PDQTY = Convert.ToDouble(data.PDQTY);
            pDAL.EXPDATE = Convert.ToDateTime(data.EXPDATE);
            pDAL.YIELD = Convert.ToDouble(data.YIELD);
            pDAL.STDQTY = Convert.ToDouble(data.STDQTY);
            pDAL.LOSTQTY = Convert.ToDouble(data.LOSTQTY);

            //### Radiate
            pDAL.RADIATEDATE = Convert.ToDateTime(data.RADIATEDATE);
            pDAL.RADIATEQTY = Convert.ToDouble(data.RADIATEQTY);
            pDAL.RADIATEUNIT = Convert.ToDouble(data.RADIATEUNIT);
            pDAL.RADIATEREMARK = data.RADIATEREMARK.ToString();

            //### RadiateReturn
            pDAL.RADIATERETDATE = Convert.ToDateTime(data.RADIATERETDATE);
            pDAL.RADIATERETQTY = Convert.ToDouble(data.RADIATERETQTY);
            pDAL.RADIATERETUNIT = Convert.ToDouble(data.RADIATERETUNIT);
            pDAL.RADIATERETREMARK = data.RADIATERETREMARK.ToString();

            //### StockInDetail
            pDAL.QUARANTINEDATE = Convert.ToDateTime(data.QUARANTINEDATE);
            pDAL.QUARANTINEQTY = Convert.ToDouble(data.QUARANTINEQTY);
            pDAL.QUARANTINEUNIT = Convert.ToDouble(data.QUARANTINEUNIT);
            pDAL.QUARANTINEREMARK = data.QUARANTINEREMARK.ToString();

            //### SendQC
            pDAL.SENDQCDATE = Convert.ToDateTime(data.SENDQCDATE);

            //### StockOutDetail
            pDAL.SENDFGDATE = Convert.ToDateTime(data.SENDFGDATE);
            pDAL.SENDFGQTY = Convert.ToDouble(data.SENDFGQTY);
            pDAL.SENDFGREMARK = data.SENDFGREMARK.ToString();

            //### Production
            pDAL.LOTNO = data.LOTNO;
            pDAL.MFGDATE = data.MFGDATE;
            pDAL.BATCHSIZE = Convert.ToDouble(data.BATCHSIZE);
            pDAL.BATCHSIZEUNIT = Convert.ToDouble(data.BATCHSIZEUNIT);
            pDAL.TOWAREHOUSE = Convert.ToDouble(data.TOWAREHOUSE);

            ret = pDAL.UpdateCurrentData(UserID, null);
            return ret;
        }
Exemple #8
0
    protected void btnSend_Click(object sender, EventArgs e)
    {
        double pdqty = PDProductFlow.CheckRadiateQty(txtPdpLoid.Text.Trim());
        
        if (PkRadiateDate.DateValue.Year.ToString() == "1")
        {
            Appz.ClientAlert(Page, "¡ÃسÒÃкØÇѹ·ÕèÊ觩ÒÂÃѧÊÕ");
            return;
        }

        else if (txtRadiateQty.Text == "")
        {
            Appz.ClientAlert(Page, "¡ÃسÒÃкبӹǹ·ÕèÊè§");
            return;
        }

        else if (Convert.ToDouble(txtRadiateQty.Text.Trim()) > pdqty)
        {
            Appz.ClientAlert(Page, "¨Ó¹Ç¹·ÕèÊ觵éͧäÁèà¡Ô¹¨Ó¹Ç¹·ÕèºÃèØä´é¨ÃÔ§");
            return;
        }

        else if (Convert.IsDBNull(cmbRadiateUnit.SelectedValue) == true || cmbRadiateUnit.SelectedValue == "")
        {
            Appz.ClientAlert(Page, "¡ÃسÒÃкØ˹èÇ·ÕèÊ觩ÒÂÃѧÊÕ");
            return;
        }
        else
        {
            bool ret = true;
            PDOrderData PoData = new PDOrderData();
            PDProductData pData = new PDProductData();
            PoData.STATUS = "RD";
            pData.PRODSTATUS = "RD";
            pData.RADIATEDATE = PkRadiateDate.DateValue;
            pData.RADIATEQTY = (txtRadiateQty.Text.Trim() == "" ? 0 : Convert.ToDouble(txtRadiateQty.Text.Trim()));
            pData.RADIATEREMARK = txtRadiateRemark.Text.Trim();
            pData.RADIATEUNIT = Convert.ToDouble(cmbRadiateUnit.SelectedValue);

            ret = PDProductFlow.Update_StatusRD(Authz.CurrentUserInfo.UserID.ToString(), pData, PoData, txtPdpLoid.Text.Trim(), txtPoLoid.Text.Trim());
            if (ret == true)
            {
                Appz.ClientAlert(Page, "Ê觩ÒÂÃѧÊÕàÃÕºÃéÍÂ");
                btnSend.Visible = false;
                LoadData(txtPdpLoid.Text.Trim());
            }
        }
    }
Exemple #9
0
 protected void btnSendQc_Click(object sender, EventArgs e)
 {
     bool ret = true;
     PDOrderData PoData = new PDOrderData();
     PDProductData pData = new PDProductData();
     PoData.STATUS = "QC";
     pData.PRODSTATUS = "QC";
     if (PkSendQcDate.DateValue.Year.ToString() == "1")
     {
         Appz.ClientAlert(Page, "¡ÃسÒÃкØÇѹ·ÕèÊè§ÇÔà¤ÃÒÐËì");
         return;
     }
     else
         pData.SENDQCDATE = PkSendQcDate.DateValue;
     ret = PDProductFlow.Update_StatusRD(Authz.CurrentUserInfo.UserID.ToString(), pData, PoData, txtPdpLoid.Text.Trim(), txtPoLoid.Text.Trim());
     if (ret == true)
     {
         Appz.ClientAlert(Page, "Êè§ QC àÃÕºÃéÍÂ");
         btnSendQc.Visible = false;
         LoadData(txtPdpLoid.Text.Trim());
     }
 }
    private void UpdateStatus()
    {
        bool ret = true;
        PDProductData pdpData = new PDProductData();
        PDOrderData poData = new PDOrderData();
        poData.STATUS = "QS";
        pdpData.PRODSTATUS = "QS";
        pdpData.QUARANTINEDATE = (PkQuarantineDate.DateValue.Year.ToString() == "1" ? DateTime.Today : PkQuarantineDate.DateValue);
        pdpData.QUARANTINEQTY = (txtQuarantineQty.Text.Trim() == "" ? 0 : Convert.ToDouble(txtQuarantineQty.Text.Trim()));
        pdpData.QUARANTINEREMARK = txtQuarantineRemark.Text.Trim();

        ret = PDProductFlow.Update_StatusRD(Authz.CurrentUserInfo.UserID.ToString(), pdpData, poData, txtPdpLoid.Text.Trim(), txtPoLoid.Text.Trim());
        if (ret == true)
        {
            Appz.ClientAlert(Page, "Êè§à¢éÒ¤Åѧ¡Ñ¡¡Ñ¹àÃÕºÃéÍÂ");
            LoadData(txtPdpLoid.Text.Trim());
            btnStockIn.Visible = false;
        }
    }
    protected void btnSend_Click(object sender, EventArgs e)
    {
        double rqty = PDProductFlow.CheckRadiateReturnQty(txtPdpLoid.Text.Trim());

        if (PkRadiateRetDate.DateValue.Year.ToString() == "1")
        {
            Appz.ClientAlert(Page, "¡ÃسÒÃкØÇѹ·ÕèÃѺ¤×¹¨Ò¡¡ÒéÒÂÃѧÊÕ");
            return;
        }

        else if (txtRadiateRetQty.Text.Trim() == "")
        {
            Appz.ClientAlert(Page, "¡ÃسÒÃкبӹǹ·ÕèÃѺ¤×¹¨Ò¡¡ÒéÒÂÃѧÊÕ");
            return;
        }

        else if (cmbRadiateRetUnit.SelectedValue == "" || Convert.IsDBNull(cmbRadiateRetUnit.SelectedValue) == true)
        {
            Appz.ClientAlert(Page, "¡ÃسÒÃкØ˹èÇ·ÕèÃѺ¤×¹¨Ò¡¡ÒéÒÂÃѧÊÕ");
            return;
        }

        else if (Convert.ToDouble(txtRadiateRetQty.Text.Trim()) > rqty)
        {
            Appz.ClientAlert(Page, "¨Ó¹Ç¹·ÕèÊ觤׹µéͧäÁèà¡Ô¹¨Ó¹Ç¹·ÕèÊ觩ÒÂÃѧÊÕ");
            return;
        }
        else
        {
            bool ret = true;
            PDOrderData PoData = new PDOrderData();
            PDProductData pData = new PDProductData();
            PoData.STATUS = "RR";
            pData.PRODSTATUS = "RR";
            pData.RADIATERETDATE = (PkRadiateRetDate.DateValue.Year.ToString() == "1" ? DateTime.Today : PkRadiateRetDate.DateValue);
            pData.RADIATERETQTY = (txtRadiateRetQty.Text.Trim() == "" ? 0 : Convert.ToDouble(txtRadiateRetQty.Text.Trim()));
            pData.RADIATERETREMARK = txtRadiateRetRemark.Text.Trim();
            pData.RADIATERETUNIT = Convert.ToDouble(cmbRadiateRetUnit.SelectedValue);

            ret = PDProductFlow.Update_StatusRR(Authz.CurrentUserInfo.UserID.ToString(), pData, PoData, txtPdpLoid.Text.Trim(), txtPoLoid.Text.Trim());
            if (ret == true)
            {
                Appz.ClientAlert(Page, "ÃѺ¤×¹¨Ò¡¡ÒéÒÂÃѧÊÕàÃÕºÃéÍÂáÅéÇ");
                btnSend.Visible = false;
                LoadData(txtPdpLoid.Text.Trim());
            }
        }
    }
Exemple #12
0
 private void InsertPdProduct()
 {
     PDProductData ppData = new PDProductData();
     DataTable dt = new DataTable();
     double POLoid = 0;
     string reftable = (txtRqiLoid.Text.Trim() == "" ? "" : "REQUISITIONITEM");
     double  refloid = (txtRqiLoid.Text.Trim() == "" ? 0 : Convert.ToDouble(txtRqiLoid.Text.Trim()));
     POLoid = PDProductFlow.InsertPdOrder(Authz.CurrentUserInfo.UserID.ToString(),txtRemark.Text.Trim(),reftable,refloid );
     if (POLoid != 0)
     {
         String expdate = SetExpDate();
         ppData.MFGDATE = dpMfgDate.DateValue;
         ppData.PRODUCT = Convert.ToDouble(cmbProduct.SelectedValue);
         ppData.BATCHSIZE =Convert.ToDouble(txtBatchSize.Text.Trim());
         ppData.BATCHSIZEUNIT = Convert.ToDouble(cmbUnitBZ.SelectedValue);
         ppData.PDORDER = POLoid;
         ppData.RADIATEUNIT = Convert.ToDouble(txtPdUnit.Text.Trim()) ;
         ppData.STDQTY = Convert.ToDouble(txtPdpStdqty.Text.Trim());
         ppData.EXPDATE = Convert.ToDateTime(expdate);
         ppData.PRODUCTTYPE = cmbType.SelectedValue;
         ppData.TOWAREHOUSE = Convert.ToDouble(cmbWarehouse.SelectedValue);
         ppData.LOTNO = txtLotNo.Text;
         if (txtRqiLoid.Text.Trim() != "")
         {
             ppData.REFLOID = Convert.ToDouble(txtRqiLoid.Text.Trim());
             ppData.REFTABLE = "REQUISITIONITEM";
         }
         
         //set control ´éǤèÒ·Õè insert ãËÁè
         dt = PDProductFlow.InsertPdProduct(Authz.CurrentUserInfo.UserID.ToString(), ppData);
         if (dt.Rows.Count > 0)
         {
             txtLotNo.Text = dt.Rows[0]["LOTNO"].ToString();
             dpMfgDate.DateValue = Convert.ToDateTime(dt.Rows[0]["MFGDATE"]);
             cmbProduct.SelectedValue = dt.Rows[0]["PRODUCT"].ToString();
             txtPackSize.Text = dt.Rows[0]["PACKSIZE"].ToString();
             cmbUnitPZ.SelectedIndex = this.cmbUnitPZ.Items.IndexOf(this.cmbUnitPZ.Items.FindByValue(dt.Rows[0]["UNITPZ"].ToString()));
             txtBatchSize.Text = dt.Rows[0]["BATCHSIZE"].ToString();
             cmbUnitBZ.SelectedIndex = this.cmbUnitBZ.Items.IndexOf(this.cmbUnitBZ.Items.FindByValue(dt.Rows[0]["BATCHSIZEUNIT"].ToString()));
             txtPdpLoid.Text = dt.Rows[0]["PDPLOID"].ToString();
             txtPoLoid.Text = dt.Rows[0]["POLOID"].ToString();
             txtRqCode.Text = dt.Rows[0]["RQCODE"].ToString();
             txtPdUnit.Text = dt.Rows[0]["PDUNIT"].ToString();
             cmbType.SelectedValue = dt.Rows[0]["PRODUCETYPE"].ToString();
             cmbWarehouse.SelectedValue = dt.Rows[0]["TOWAREHOUSE"].ToString();
             if (!Convert.IsDBNull(dt.Rows[0]["REQDATE"]))
                 txtReqDate.Text = Convert.ToDateTime(dt.Rows[0]["REQDATE"]).ToString(Constz.DateFormat);
             else
                 txtReqDate.Text = "";
         }
     }
     else
     {
         Appz.ClientAlert(Page, POLoid.ToString());
     }
 }
Exemple #13
0
    private void UpdateData()
    {
        bool retMaterial = true;
        bool retMaterialLost = true;
        bool retPackageLost = true;
        bool retPDProduct = true;
        bool retPo = true;
        ReqMaterialData RmData = new ReqMaterialData();
        PDProductFlow PpFlow = new PDProductFlow();

        //### update Material
        if (Session["tempMaterial"] != null)
            TempGetMaterial = (DataTable)Session["tempMaterial"];

        retMaterial = PpFlow.UpdateMaterial(Authz.CurrentUserInfo.UserID, txtPdpLoid.Text.Trim(), TempGetMaterial);

        //### update MaterialLost
        if (Session["tempMaterialLost"] != null)
            TempGetMaterialLost = (DataTable)Session["tempMaterialLost"];
        retMaterialLost = PpFlow.UpdateMaterialLost(Authz.CurrentUserInfo.UserID, txtPdpLoid.Text.Trim(), TempGetMaterialLost);

        //### update PackageLost
        if (Session["tempPgLost"] != null)
            TempGetPackageLost = (DataTable)Session["tempPgLost"];
        retPackageLost = PpFlow.UpdatePackageLost(Authz.CurrentUserInfo.UserID, txtPdpLoid.Text.Trim(), TempGetPackageLost);


        //### update ProductFill
        PDProductData PpData = new PDProductData();
        PpData.LOID = Convert.ToDouble(txtPdpLoid.Text.Trim());
        PpData.PACKING = ctlTab.GetPacking;
        PpData.PACKAGE = ctlTab.GetPackage;
        PpData.PDQTY = ctlTab.GetPdQty;
        PpData.EXPDATE = Convert.ToDateTime(ctlTab.GetExpDate);
        PpData.YIELD = ctlTab.GetYield;
        PpData.LOSTQTY = ctlTab.GetLost;
        PpData.STDQTY = Convert.ToDouble(txtPdpStdqty.Text.Trim());

        //### update Radiate
        PpData.RADIATEDATE = Convert.ToDateTime(ctlTab.GetRadiateDate);
        PpData.RADIATEQTY = ctlTab.GetRadiateQty;
        PpData.RADIATEUNIT = ctlTab.GetRadiateUnit;
        PpData.RADIATEREMARK = ctlTab.GetRadiateRemark;

        //### update RadiateReturn
        PpData.RADIATERETDATE = Convert.ToDateTime(ctlTab.GetRadiateRetDate);
        PpData.RADIATERETQTY = Convert.ToDouble(ctlTab.GetRadiateRetQty);
        PpData.RADIATERETUNIT = Convert.ToDouble(ctlTab.GetRadiateRetUnit);
        PpData.RADIATERETREMARK = ctlTab.GetRadiateRetRemark;
        
        //### update StockInDetail
        PpData.QUARANTINEDATE= Convert.ToDateTime(ctlTab.GetQuarantineDate);
        PpData.QUARANTINEQTY = Convert.ToDouble(ctlTab.GetQuarantineQty);
        PpData.QUARANTINEUNIT = Convert.ToDouble(ctlTab.GetQuarantineUnit);
        PpData.QUARANTINEREMARK = ctlTab.GetQuarantineRemark;

        //### update SendQC
        //if (ctlTab.GetSendQCDate == "1/1/0544 0:00:00")
        //    Appz.ClientAlert(Page, "¡ÃسÒÃкØÇѹ·ÕèÊè§ÇÔà¤ÃÒÐËì");
        //else
            PpData.SENDQCDATE = Convert.ToDateTime(ctlTab.GetSendQCDate);

        //### update StockOutDetail
        PpData.SENDFGDATE = Convert.ToDateTime(ctlTab.GetSendFGDate);
        PpData.SENDFGQTY = Convert.ToDouble(ctlTab.GetSendFGQty);
        PpData.SENDFGREMARK = ctlTab.GetSendFGRemark.ToString();

        //## Production
        PpData.LOTNO = txtLotNo.Text.Trim();
        PpData.MFGDATE = dpMfgDate.DateValue;
        PpData.BATCHSIZE = Convert.ToDouble(txtBatchSize.Text.Trim());
        PpData.BATCHSIZEUNIT = Convert.ToDouble(cmbUnitBZ.SelectedValue);
        PpData.PRODUCTTYPE = cmbType.SelectedValue;
        PpData.TOWAREHOUSE = Convert.ToDouble(cmbWarehouse.SelectedValue);

        retPDProduct = PDProductFlow.UpdatePDPrdouct(Authz.CurrentUserInfo.UserID.ToString(), PpData);

        retPo = UpdatePdOrder();

        if (retMaterial == false || retPDProduct == false || retPackageLost == false || retMaterialLost ==false || retPo == false  )
            Appz.ClientAlert(Page, PpFlow.ErrorMessage);
        else
        {
            LoadData(cmbProduct.SelectedValue.ToString(), txtPdpLoid.Text.Trim());
            Appz.ClientAlert(Page, "·Ó¡ÒÃá¡é䢢éÍÁÙźѹ·Ö¡¡ÒüÅÔµàÃÕºÃéÍÂ");
        }
    }