예제 #1
0
 private void InsertMaterialItem()
 {
     bool ret = true;
     PDProductFlow PpFlow = new PDProductFlow();
     if (txtRqCode.Text.Trim() == "")
     {
         DataTable dt = PDProductFlow.CheckMaterialItem(Convert.ToDouble(cmbProduct.SelectedValue));
         string pp = txtPdpLoid.Text.Trim();
         ret = PpFlow.InsertMaterialItem(Authz.CurrentUserInfo.UserID.ToString(), dt, Convert.ToDouble(txtPdpLoid.Text.Trim()));
     }
     else
     {
         DataTable dt = PDProductFlow.CheckMaterialItemWithReq(Convert.ToDouble(cmbProduct.SelectedValue));
         string pp = txtPdpLoid.Text.Trim();
         ret = PpFlow.InsertMaterialItem(Authz.CurrentUserInfo.UserID.ToString(), dt, Convert.ToDouble(txtPdpLoid.Text.Trim()));
     }
 }
예제 #2
0
    public void DeleteData()
    {
        double PDPLOID;
        ArrayList arrLOID = new ArrayList();
        PDProductFlow csFlow = new PDProductFlow();
        bool ret = true;

        for (int i = 0; i < gvResult.Rows.Count; i++)
        {
            CheckBox chkItem = (CheckBox)gvResult.Rows[i].Cells[0].FindControl("chkItem");
            if (chkItem.Checked == true)
            {
                PDPLOID = Convert.ToDouble(gvResult.Rows[i].Cells[2].Text);
                arrLOID.Add(PDPLOID);
            }
        }
        if (arrLOID.Count != 0)
        {
            ret = csFlow.DeleteData(arrLOID);
        }

        if (ret == true)
        {
            Appz.ClientAlert(Page, "·Ó¡ÒÃź¢éÍÁÙźѹ·Ö¡¡ÒüÅÔµ¼ÅÔµÀѳ±ì¨Ò¡ÊÁعä¾ÃàÃÕºÃéÍÂ");
            SearchData();
        }
        else
            Appz.ClientAlert(Page, csFlow.ErrorMessage);
    }
예제 #3
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, "·Ó¡ÒÃá¡é䢢éÍÁÙźѹ·Ö¡¡ÒüÅÔµàÃÕºÃéÍÂ");
        }
    }