Ejemplo n.º 1
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;
        }
Ejemplo n.º 2
0
    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;
            }
        }
    }
Ejemplo n.º 3
0
 public static bool UpdatePdOrder(string UserID, PDOrderData data,double PoLoid)
 {
     PDOrderDAL poDAL = new PDOrderDAL();
     poDAL.GetDataByLOID(PoLoid, null);
     poDAL.REMARK = data.REMARK;
     poDAL.SUPPLIER = Constz.ProductionDepartment.LOID;
     bool ret = poDAL.UpdateCurrentData(UserID, null);
     return ret;
 }
Ejemplo n.º 4
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;
        }
Ejemplo n.º 5
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());
            }
        }
    }
Ejemplo n.º 6
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());
     }
 }
Ejemplo n.º 7
0
    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;
        }
    }
Ejemplo n.º 8
0
    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());
            }
        }
    }
Ejemplo n.º 9
0
 private bool UpdatePdOrder()
 {
     bool ret = true;
     PDOrderData poData = new PDOrderData();
     poData.REMARK = txtRemark.Text.Trim();
     ret = PDProductFlow.UpdatePdOrder(Authz.CurrentUserInfo.UserID.ToString(), poData, Convert.ToDouble(txtPoLoid.Text.Trim()));
     return ret;
 }