Inheritance: com.Sconit.Control.DropDownList
Exemple #1
0
    protected void ddlPricingMethod_SelectedIndexChanged(object sender, EventArgs e)
    {
        com.Sconit.Control.CodeMstrDropDownList ddlPricingMethod = ((com.Sconit.Control.CodeMstrDropDownList)(this.FV_Order.FindControl("ddlPricingMethod")));
        DropDownList ddlType = (DropDownList)(this.FV_Order.FindControl("ddlType"));

        ddlType.DataSource = GetVehicleTypeGroup(ddlPricingMethod.SelectedValue);
        ddlType.DataBind();
    }
Exemple #2
0
    protected void ODS_TransportPriceListDetail_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Controls_TextBox tbItem = ((Controls_TextBox)(this.FV_Operation.FindControl("tbItem")));

        com.Sconit.Control.CodeMstrDropDownList ddlBillingMethod = ((com.Sconit.Control.CodeMstrDropDownList)(this.FV_Operation.FindControl("ddlBillingMethod")));
        Controls_TextBox tbCurrency = ((Controls_TextBox)(this.FV_Operation.FindControl("tbCurrency")));
        TextBox          tbEndDate  = ((TextBox)(this.FV_Operation.FindControl("tbEndDate")));

        transportPriceListDetail = (TransportPriceListDetail)e.InputParameters[0];
        transportPriceListDetail.TransportPriceList = TheTransportPriceListMgr.LoadTransportPriceList(this.TransportPriceListCode);
        transportPriceListDetail.Item          = tbItem.Text.Trim() == String.Empty ? null : TheItemMgr.LoadItem(tbItem.Text.Trim());
        transportPriceListDetail.BillingMethod = ddlBillingMethod.SelectedValue;
        transportPriceListDetail.Currency      = TheCurrencyMgr.LoadCurrency(tbCurrency.Text.Trim());
        transportPriceListDetail.TaxCode       = transportPriceListDetail.TaxCode.Trim();
        transportPriceListDetail.EndDate       = tbEndDate.Text.Trim() == "" ? null : transportPriceListDetail.EndDate;
        transportPriceListDetail.Type          = BusinessConstants.TRANSPORTATION_PRICELIST_DETAIL_TYPE_OPERATION;
    }
Exemple #3
0
    protected void ODS_BomDetail_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
    {
        string parcode  = ((Controls_TextBox)(this.FV_BomDetail.FindControl("tbParCode"))).Text.Trim();
        string compcode = ((Controls_TextBox)(this.FV_BomDetail.FindControl("tbCompCode"))).Text.Trim();
        string uom      = ((Controls_TextBox)(this.FV_BomDetail.FindControl("tbUom"))).Text.Trim();
        string location = ((Controls_TextBox)(this.FV_BomDetail.FindControl("tbLocation"))).Text.Trim();

        com.Sconit.Control.CodeMstrDropDownList ddlBackFlushMethod = (com.Sconit.Control.CodeMstrDropDownList) this.FV_BomDetail.FindControl("ddlBackFlushMethod");

        bomdetail      = (BomDetail)e.InputParameters[0];
        bomdetail.Bom  = TheBomMgr.LoadBom(parcode);
        item           = TheItemMgr.LoadItem(compcode);
        bomdetail.Item = item;
        if (item != null)
        {
            //default compcode and uom
            if (uom.Trim() == "")
            {
                bomdetail.Uom = item.Uom;
            }
            else
            {
                bomdetail.Uom = TheUomMgr.LoadUom(uom);
            }
        }
        if (location == "")
        {
            bomdetail.Location = null;
        }
        else
        {
            bomdetail.Location = TheLocationMgr.LoadLocation(location);
        }
        if (ddlBackFlushMethod.SelectedIndex != -1)
        {
            bomdetail.BackFlushMethod = ddlBackFlushMethod.SelectedValue;
        }

        bomdetail.ScrapPercentage = bomdetail.ScrapPercentage / 100;
        if (TheBomDetailMgr.CheckUniqueExist(bomdetail.Bom.Code, bomdetail.Item.Code, bomdetail.Operation, bomdetail.Reference, bomdetail.StartDate))
        {
            ShowWarningMessage("MasterData.BomDetail.WarningMessage.UniqueExistError");
            e.Cancel = true;
        }
    }
Exemple #4
0
    protected void ODS_GV_BatchTrigger_OnUpdating(object source, ObjectDataSourceMethodEventArgs e)
    {
        BatchTrigger batchTrigger = (BatchTrigger)e.InputParameters[0];
        BatchTrigger oldTrigger   = TheBatchTriggerMgr.LoadBatchTrigger(batchTrigger.Id);

        batchTrigger.BatchJobDetail = oldTrigger.BatchJobDetail;
        batchTrigger.Name           = oldTrigger.Name;
        batchTrigger.Description    = oldTrigger.Description;

        GridViewRow row = this.GV_List.Rows[this.CurrentIndex];

        com.Sconit.Control.CodeMstrDropDownList ddlIntervalType = (com.Sconit.Control.CodeMstrDropDownList)row.FindControl("ddlIntervalType");
        if (ddlIntervalType.SelectedIndex != -1)
        {
            batchTrigger.IntervalType = ddlIntervalType.SelectedValue;
        }
        CurrentJob = oldTrigger.BatchJobDetail.Name;
    }
Exemple #5
0
    protected void ODS_BomDetail_Updating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        string parcode  = ((TextBox)(this.FV_BomDetail.FindControl("tbParCode"))).Text.Trim();
        string compcode = ((TextBox)(this.FV_BomDetail.FindControl("tbCompCode"))).Text.Trim();
        string uom      = ((Controls_TextBox)(this.FV_BomDetail.FindControl("tbUom"))).Text.Trim();
        string location = ((Controls_TextBox)(this.FV_BomDetail.FindControl("tbLocation"))).Text.Trim();
        string endTime  = ((TextBox)(this.FV_BomDetail.FindControl("tbEndTime"))).Text.Trim();

        com.Sconit.Control.CodeMstrDropDownList ddlBackFlushMethod = (com.Sconit.Control.CodeMstrDropDownList) this.FV_BomDetail.FindControl("ddlBackFlushMethod");

        bomdetail      = (BomDetail)e.InputParameters[0];
        bomdetail.Bom  = TheBomMgr.LoadBom(parcode);
        item           = TheItemMgr.LoadItem(compcode);
        bomdetail.Item = item;
        if (item != null)
        {
            //default compcode and uom
            if (uom.Trim() == string.Empty)
            {
                bomdetail.Uom = item.Uom;
            }
            else
            {
                bomdetail.Uom = TheUomMgr.LoadUom(uom);
            }
        }
        if (location == string.Empty)
        {
            bomdetail.Location = null;
        }
        else
        {
            bomdetail.Location = TheLocationMgr.LoadLocation(location);
        }
        if (ddlBackFlushMethod.SelectedIndex != -1)
        {
            bomdetail.BackFlushMethod = ddlBackFlushMethod.SelectedValue;
        }
        if (endTime != string.Empty)
        {
            bomdetail.EndDate = DateTime.Parse(endTime);
        }
        bomdetail.ScrapPercentage = bomdetail.ScrapPercentage / 100;
    }
Exemple #6
0
    protected void FV_TransportPriceListDetail_DataBound(object sender, EventArgs e)
    {
        ((Literal)(this.FV_Operation.FindControl("lbCurrentTransportPriceList"))).Text = this.TransportPriceListCode;

        if (TransportPriceListDetailId != null && TransportPriceListDetailId != string.Empty)
        {
            TransportPriceListDetail transportPriceListDetail = (TransportPriceListDetail)((FormView)sender).DataItem;

            Controls_TextBox tbItem = (Controls_TextBox)this.FV_Operation.FindControl("tbItem");

            if (transportPriceListDetail.Item != null && transportPriceListDetail.Item.Code != string.Empty)
            {
                tbItem.Text = transportPriceListDetail.Item.Code;
            }

            com.Sconit.Control.CodeMstrDropDownList ddlBillingMethod = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Operation.FindControl("ddlBillingMethod");

            if (transportPriceListDetail.BillingMethod != null)
            {
                ddlBillingMethod.SelectedValue = transportPriceListDetail.BillingMethod;
            }

            Controls_TextBox tbCurrency = (Controls_TextBox)(this.FV_Operation.FindControl("tbCurrency"));

            if (transportPriceListDetail.Currency != null && transportPriceListDetail.Currency.Code != string.Empty)
            {
                tbCurrency.Text = transportPriceListDetail.Currency.Code;
            }

            TextBox tbStartDate = ((TextBox)(this.FV_Operation.FindControl("tbStartDate")));

            if (transportPriceListDetail.StartDate != null)
            {
                tbStartDate.Text = transportPriceListDetail.StartDate.ToString("yyyy-MM-dd");
            }

            TextBox tbEndDate = ((TextBox)(this.FV_Operation.FindControl("tbEndDate")));

            if (transportPriceListDetail.EndDate != null)
            {
                tbEndDate.Text = ((DateTime)transportPriceListDetail.EndDate).ToString("yyyy-MM-dd");
            }
        }
    }
Exemple #7
0
    private void UpdateView()
    {
        bomdetail = TheBomDetailMgr.LoadBomDetail(Convert.ToInt32(this.code));
        TextBox          tbParCode         = (TextBox)(this.FV_BomDetail.FindControl("tbParCode"));
        TextBox          tbCompCode        = (TextBox)(this.FV_BomDetail.FindControl("tbCompCode"));
        TextBox          tbOp              = (TextBox)(this.FV_BomDetail.FindControl("tbOp"));
        TextBox          tbReference       = (TextBox)(this.FV_BomDetail.FindControl("tbReference"));
        TextBox          tbStartTime       = (TextBox)(this.FV_BomDetail.FindControl("tbStartTime"));
        TextBox          tbEndTime         = (TextBox)(this.FV_BomDetail.FindControl("tbEndTime"));
        TextBox          tbRateQty         = (TextBox)(this.FV_BomDetail.FindControl("tbRateQty"));
        Controls_TextBox tbUom             = (Controls_TextBox)(this.FV_BomDetail.FindControl("tbUom"));
        Controls_TextBox tbStruType        = (Controls_TextBox)(this.FV_BomDetail.FindControl("tbStruType"));
        TextBox          tbScrapPercentage = (TextBox)(this.FV_BomDetail.FindControl("tbScrapPercentage"));
        Controls_TextBox tbLocation        = (Controls_TextBox)(this.FV_BomDetail.FindControl("tbLocation"));
        CheckBox         cbNeedPrint       = (CheckBox)(this.FV_BomDetail.FindControl("cbNeedPrint"));
        CheckBox         cbIsShipScan      = (CheckBox)(this.FV_BomDetail.FindControl("cbIsShipScan"));
        TextBox          tbPriority        = (TextBox)(this.FV_BomDetail.FindControl("tbPriority"));

        com.Sconit.Control.CodeMstrDropDownList ddlBackFlushMethod = (com.Sconit.Control.CodeMstrDropDownList) this.FV_BomDetail.FindControl("ddlBackFlushMethod");

        tbParCode.Text   = bomdetail.Bom.Code;
        tbCompCode.Text  = bomdetail.Item.Code;
        tbOp.Text        = bomdetail.Operation.ToString();
        tbReference.Text = bomdetail.Reference;
        tbStartTime.Text = bomdetail.StartDate.ToString("yyyy-MM-dd HH:mm");
        if (bomdetail.EndDate != null)
        {
            tbEndTime.Text = ((DateTime)bomdetail.EndDate).ToString("yyyy-MM-dd HH:mm");
        }
        tbRateQty.Text         = bomdetail.RateQty.ToString("0.########");
        tbUom.Text             = bomdetail.Uom.Code;
        tbStruType.Text        = bomdetail.StructureType;
        tbScrapPercentage.Text = (100 * bomdetail.ScrapPercentage).ToString("0.########");
        if (bomdetail.Location != null)
        {
            tbLocation.Text = bomdetail.Location.Code;
        }
        tbPriority.Text = bomdetail.Priority.ToString();
        if (bomdetail.BackFlushMethod != string.Empty)
        {
            ddlBackFlushMethod.SelectedValue = bomdetail.BackFlushMethod;
        }
    }
Exemple #8
0
    protected void FV_FlowBinding_DataBound(object sender, EventArgs e)
    {
        FlowBinding flowBinding = TheFlowBindingMgr.LoadFlowBinding(FlowBindingId);

        Label            lblMasterFlowTypeValue = (Label)this.FV_FlowBinding.FindControl("lblMasterFlowTypeValue");
        Label            lblMasterFlowValue     = (Label)this.FV_FlowBinding.FindControl("lblMasterFlowValue");
        Controls_TextBox tbSlaveFlow            = (Controls_TextBox)this.FV_FlowBinding.FindControl("tbSlaveFlow");

        com.Sconit.Control.CodeMstrDropDownList ddlBindingType = (com.Sconit.Control.CodeMstrDropDownList) this.FV_FlowBinding.FindControl("ddlBindingType");

        tbSlaveFlow.ServiceParameter = "string:" + this.CurrentUser.Code;
        tbSlaveFlow.DataBind();

        lblMasterFlowTypeValue.Text = flowBinding.MasterFlow.Type;
        lblMasterFlowValue.Text     = flowBinding.MasterFlow.Code;

        tbSlaveFlow.Text    = flowBinding.SlaveFlow.Code;
        ddlBindingType.Text = flowBinding.BindingType;
    }
Exemple #9
0
    protected void ODS_FlowBinding_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
    {
        flowBinding            = (FlowBinding)e.InputParameters[0];
        flowBinding.MasterFlow = TheFlowMgr.LoadFlow(FlowCode);

        Controls_TextBox tbSlaveFlow = (Controls_TextBox)this.FV_FlowBinding.FindControl("tbSlaveFlow");

        com.Sconit.Control.CodeMstrDropDownList ddlBindingType = (com.Sconit.Control.CodeMstrDropDownList) this.FV_FlowBinding.FindControl("ddlBindingType");

        if (tbSlaveFlow != null && tbSlaveFlow.Text.Trim() != string.Empty)
        {
            flowBinding.SlaveFlow = TheFlowMgr.LoadFlow(tbSlaveFlow.Text);
        }

        if (ddlBindingType.SelectedIndex != -1)
        {
            flowBinding.BindingType = ddlBindingType.SelectedValue;
        }
    }
Exemple #10
0
    protected void FV_Strategy_DataBound(object sender, EventArgs e)
    {
        ((HtmlGenericControl)this.FV_Strategy.FindControl("lStrategy")).InnerText = FlowHelper.GetFlowStrategyLabel(this.ModuleType);
        if (FlowCode != null && FlowCode != string.Empty)
        {
            Flow flow = (Flow)((FormView)sender).DataItem;

            com.Sconit.Control.CodeMstrDropDownList ddlStrategy = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Strategy.FindControl("ddlStrategy");
            Literal lblFlowStrategy = (Literal)this.FV_Strategy.FindControl("lblFlowStrategy");
            lblFlowStrategy.Text = FlowHelper.GetFlowStrategyLabel(this.ModuleType) + ":";
            if (flow.FlowStrategy != null)
            {
                ddlStrategy.Text = flow.FlowStrategy;
            }
            else
            {
                ddlStrategy.Text = string.Empty;
            }
        }
    }
Exemple #11
0
    protected void ddlPricingMethod_SelectedIndexChanged(object sender, EventArgs e)
    {
        com.Sconit.Control.CodeMstrDropDownList ddlPricingMethod = ((com.Sconit.Control.CodeMstrDropDownList)(this.FV_TransportPriceListDetail.FindControl("ddlPricingMethod")));
        TextBox      tbMinVolume    = (TextBox)(this.FV_TransportPriceListDetail.FindControl("tbMinVolume"));
        DropDownList ddlVehicleType = ((DropDownList)(this.FV_TransportPriceListDetail.FindControl("ddlVehicleType")));

        if (ddlPricingMethod.SelectedValue == BusinessConstants.TRANSPORTATION_PRICING_METHOD_SHIPT)
        {
            tbMinVolume.Enabled = false;
        }
        else
        {
            tbMinVolume.Enabled = true;
        }

        tbMinVolume.Text = "0";

        TextBox tbStartQty = (TextBox)(this.FV_TransportPriceListDetail.FindControl("tbStartQty"));
        TextBox tbEndQty   = (TextBox)(this.FV_TransportPriceListDetail.FindControl("tbEndQty"));
        TextBox tbMinPrice = (TextBox)(this.FV_TransportPriceListDetail.FindControl("tbMinPrice"));

        if (ddlPricingMethod.SelectedValue == BusinessConstants.TRANSPORTATION_PRICING_METHOD_LADDERSTERE)
        {
            tbStartQty.Enabled = true;
            tbEndQty.Enabled   = true;
            tbMinPrice.Enabled = true;
        }
        else
        {
            tbStartQty.Enabled = false;
            tbEndQty.Enabled   = false;
            tbMinPrice.Enabled = false;
        }

        tbStartQty.Text = "0";
        tbEndQty.Text   = "0";
        tbMinPrice.Text = "0";

        ddlVehicleType.DataSource = GetVehicleTypeGroup(ddlPricingMethod.SelectedValue);
        ddlVehicleType.DataBind();
    }
Exemple #12
0
 public void PageCleanup()
 {
     ((Literal)(this.FV_TransportPriceListDetail.FindControl("lbCurrentTransportPriceList"))).Text = this.TransportPriceListCode;
     ((Controls_TextBox)(this.FV_TransportPriceListDetail.FindControl("tbShipFrom"))).Text         = string.Empty;
     ((Controls_TextBox)(this.FV_TransportPriceListDetail.FindControl("tbShipTo"))).Text           = string.Empty;
     InitPricingMethod();
     ((DropDownList)(this.FV_TransportPriceListDetail.FindControl("ddlVehicleType"))).SelectedIndex = 0;
     ((TextBox)(this.FV_TransportPriceListDetail.FindControl("tbUnitPrice"))).Text                 = "0";
     ((Controls_TextBox)(this.FV_TransportPriceListDetail.FindControl("tbCurrency"))).Text         = string.Empty;
     ((TextBox)(this.FV_TransportPriceListDetail.FindControl("tbMinVolume"))).Text                 = "0";
     ((CheckBox)(this.FV_TransportPriceListDetail.FindControl("cbIsProvisionalEstimate"))).Checked = false;
     ((TextBox)(this.FV_TransportPriceListDetail.FindControl("tbTaxCode"))).Text          = string.Empty;
     ((CheckBox)(this.FV_TransportPriceListDetail.FindControl("cbIsIncludeTax"))).Checked = false;
     ((TextBox)(this.FV_TransportPriceListDetail.FindControl("tbStartDate"))).Text        = DateTime.Now.Date.ToString("yyyy-MM-dd");
     ((TextBox)(this.FV_TransportPriceListDetail.FindControl("tbEndDate"))).Text          = string.Empty;
     ((TextBox)(this.FV_TransportPriceListDetail.FindControl("tbStartQty"))).Text         = "0";
     ((TextBox)(this.FV_TransportPriceListDetail.FindControl("tbEndQty"))).Text           = "0";
     ((TextBox)(this.FV_TransportPriceListDetail.FindControl("tbMinPrice"))).Text         = "0";
     com.Sconit.Control.CodeMstrDropDownList ddlTransportMethod = ((com.Sconit.Control.CodeMstrDropDownList)(this.FV_TransportPriceListDetail.FindControl("ddlTransportMethod")));
     ddlTransportMethod.SelectedIndex = 0;
     ddlTransportMethod.Enabled       = true;
 }
Exemple #13
0
    protected void ODS_ShiftDetail_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
    {
        ShiftDetail shiftDetail = (ShiftDetail)e.InputParameters[0];
        string      shiftCode   = ((TextBox)(this.FV_ShiftDetail.FindControl("tbCode"))).Text;

        shiftDetail.Shift = TheShiftMgr.LoadShift(shiftCode);
        if (shiftDetail.Shift == null)
        {
            ShowErrorMessage("MasterData.WorkCalendar.ErrorMessage.ShiftNotExist");
            e.Cancel = true;
        }
        if (((TextBox)(this.FV_ShiftDetail.FindControl("tbStartDate"))).Text.Trim() == string.Empty)
        {
            shiftDetail.StartDate = null;
        }
        if (((TextBox)(this.FV_ShiftDetail.FindControl("tbEndDate"))).Text.Trim() == string.Empty)
        {
            shiftDetail.EndDate = null;
        }
        com.Sconit.Control.CodeMstrDropDownList ddlDaysAdd = ((com.Sconit.Control.CodeMstrDropDownList)(this.FV_ShiftDetail.FindControl("ddlDaysAdd")));
        shiftDetail.DaysAdd = ddlDaysAdd.SelectedValue;
    }
Exemple #14
0
    protected void FV_Vehicle_DataBound(object sender, EventArgs e)
    {
        if (VehicleCode != null && VehicleCode != string.Empty)
        {
            Vehicle vehicle = (Vehicle)((FormView)sender).DataItem;

            Controls_TextBox tbCarrier = (Controls_TextBox)this.FV_Vehicle.FindControl("tbCarrier");
            tbCarrier.ServiceParameter = "string:" + this.CurrentUser.Code;
            tbCarrier.DataBind();

            if (vehicle.Carrier != null && vehicle.Carrier.Code.Trim() != string.Empty)
            {
                tbCarrier.Text = vehicle.Carrier.Code;
            }

            com.Sconit.Control.CodeMstrDropDownList ddlType = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Vehicle.FindControl("ddlType");

            if (vehicle.Type != null)
            {
                ddlType.SelectedValue = vehicle.Type;
            }
        }
    }
Exemple #15
0
    protected void ODS_TransportPriceListDetail_Updating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Controls_TextBox tbShipFrom = ((Controls_TextBox)(this.FV_TransportPriceListDetail.FindControl("tbShipFrom")));
        Controls_TextBox tbShipTo   = ((Controls_TextBox)(this.FV_TransportPriceListDetail.FindControl("tbShipTo")));

        com.Sconit.Control.CodeMstrDropDownList ddlPricingMethod = ((com.Sconit.Control.CodeMstrDropDownList)(this.FV_TransportPriceListDetail.FindControl("ddlPricingMethod")));
        DropDownList     ddlVehicleType        = ((DropDownList)(this.FV_TransportPriceListDetail.FindControl("ddlVehicleType")));
        Controls_TextBox tbCurrency            = ((Controls_TextBox)(this.FV_TransportPriceListDetail.FindControl("tbCurrency")));
        TextBox          tbEndDate             = ((TextBox)(this.FV_TransportPriceListDetail.FindControl("tbEndDate")));
        DropDownList     transportMethodSelect = ((DropDownList)(this.FV_TransportPriceListDetail.FindControl("ddlTransportMethod")));

        transportPriceListDetail = (TransportPriceListDetail)e.InputParameters[0];
        transportPriceListDetail.TransportPriceList = TheTransportPriceListMgr.LoadTransportPriceList(this.TransportPriceListCode);
        transportPriceListDetail.ShipFrom           = TheTransportationAddressMgr.LoadTransportationAddress(GetTransportationAddressId(tbShipFrom.Text.Trim()));
        transportPriceListDetail.ShipTo             = TheTransportationAddressMgr.LoadTransportationAddress(GetTransportationAddressId(tbShipTo.Text.Trim()));
        transportPriceListDetail.PricingMethod      = ddlPricingMethod.SelectedValue;
        transportPriceListDetail.VehicleType        = ddlVehicleType.SelectedValue;
        transportPriceListDetail.Currency           = TheCurrencyMgr.LoadCurrency(tbCurrency.Text.Trim());
        transportPriceListDetail.TaxCode            = transportPriceListDetail.TaxCode.Trim();
        transportPriceListDetail.EndDate            = tbEndDate.Text.Trim() == "" ? null : transportPriceListDetail.EndDate;
        transportPriceListDetail.Type            = BusinessConstants.TRANSPORTATION_PRICELIST_DETAIL_TYPE_TRANSPORTATION;
        transportPriceListDetail.TransportMethod = transportMethodSelect.SelectedValue;
    }
Exemple #16
0
    private void PageCleanup()
    {
        ((Controls_TextBox)(this.FV_FlowDetail.FindControl("tbRefItemCode"))).Text = string.Empty;
        ((Controls_TextBox)this.FV_FlowDetail.FindControl("tbItemCode")).Text      = string.Empty;
        ((Controls_TextBox)this.FV_FlowDetail.FindControl("tbUom")).Text           = string.Empty;

        ((TextBox)(this.FV_FlowDetail.FindControl("tbUC"))).Text                       = string.Empty;
        ((TextBox)(this.FV_FlowDetail.FindControl("tbSeq"))).Text                      = string.Empty;
        ((TextBox)(this.FV_FlowDetail.FindControl("tbSafeStock"))).Text                = string.Empty;
        ((TextBox)(this.FV_FlowDetail.FindControl("tbMaxStock"))).Text                 = string.Empty;
        ((TextBox)(this.FV_FlowDetail.FindControl("tbMinLotSize"))).Text               = string.Empty;
        ((TextBox)(this.FV_FlowDetail.FindControl("tbOrderLotSize"))).Text             = string.Empty;
        ((TextBox)(this.FV_FlowDetail.FindControl("tbOrderGoodsReceiptLotSize"))).Text = string.Empty;
        ((TextBox)(this.FV_FlowDetail.FindControl("tbRoundUpOpt"))).Text               = string.Empty;


        ((TextBox)(this.FV_FlowDetail.FindControl("tbPackageVol"))).Text         = string.Empty;
        ((TextBox)(this.FV_FlowDetail.FindControl("tbHuLotSize"))).Text          = string.Empty;
        ((TextBox)(this.FV_FlowDetail.FindControl("tbProjectDescription"))).Text = string.Empty;
        ((TextBox)(this.FV_FlowDetail.FindControl("tbRemark"))).Text             = string.Empty;
        ((CheckBox)(this.FV_FlowDetail.FindControl("cbIsAutoCreate"))).Checked   = true;
        ((CheckBox)(this.FV_FlowDetail.FindControl("cbIsMrp"))).Checked          = true;

        ((TextBox)(this.FV_FlowDetail.FindControl("tbMRPWeight"))).Text = "1";

        #region   EDI Option
        ((TextBox)(this.FV_FlowDetail.FindControl("tbGrossWeight"))).Text = string.Empty;
        ((TextBox)(this.FV_FlowDetail.FindControl("tbNetWeight"))).Text   = string.Empty;
        ((TextBox)(this.FV_FlowDetail.FindControl("tbWeightUom"))).Text   = string.Empty;
        ((TextBox)(this.FV_FlowDetail.FindControl("tbCarrierCode"))).Text = string.Empty;
        ((System.Web.UI.HtmlControls.HtmlSelect) this.FV_FlowDetail.FindControl("tbTransModeCode")).Value = string.Empty;
        ((TextBox)(this.FV_FlowDetail.FindControl("tbConveyanceNumber"))).Text = string.Empty;
        //((TextBox)(this.FV_FlowDetail.FindControl("tbReceivingPlant"))).Text = string.Empty;
        //((TextBox)(this.FV_FlowDetail.FindControl("tbShipFrom"))).Text = string.Empty;
        ((System.Web.UI.HtmlControls.HtmlSelect) this.FV_FlowDetail.FindControl("tbPackagingCode")).Value = string.Empty;
        ((TextBox)(this.FV_FlowDetail.FindControl("tbLadingQuantity"))).Text    = string.Empty;
        ((TextBox)(this.FV_FlowDetail.FindControl("tbUnitsPerContainer"))).Text = string.Empty;
        #endregion

        Literal      lblBillSettleTerm = (Literal)this.FV_FlowDetail.FindControl("lblBillSettleTerm");
        DropDownList ddlBillSettleTerm = (DropDownList)this.FV_FlowDetail.FindControl("ddlBillSettleTerm");
        if (ddlBillSettleTerm.Visible)
        {
            ddlBillSettleTerm.SelectedIndex = 0;
        }

        Literal      lblOddShipOption = (Literal)this.FV_FlowDetail.FindControl("lblOddShipOption");
        DropDownList ddlOddShipOption = (DropDownList)this.FV_FlowDetail.FindControl("ddlOddShipOption");
        if (ddlOddShipOption.Visible)
        {
            ddlOddShipOption.SelectedIndex = 0;
        }



        Flow flow = TheFlowMgr.LoadFlow(FlowCode);

        Controls_TextBox tbRefItemCode = (Controls_TextBox)(this.FV_FlowDetail.FindControl("tbRefItemCode"));
        tbRefItemCode.ServiceParameter = "string:#tbItemCode,string:" + flow.PartyFrom.Code + ",string:" + flow.PartyTo.Code;
        tbRefItemCode.DataBind();
        if (this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_PROCUREMENT ||
            this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_CUSTOMERGOODS ||
            this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_SUBCONCTRACTING)
        {
            this.FV_FlowDetail.FindControl("fdProcurement").Visible = true;
            Controls_TextBox tbLocTo = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbProcurementLocTo");
            tbLocTo.ServiceParameter = "string:" + flow.PartyTo.Code;
            tbLocTo.DataBind();
            tbLocTo.Text = string.Empty;
            if (this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_PROCUREMENT ||
                this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_SUBCONCTRACTING)
            {
                lblBillSettleTerm.Visible = true;
                ddlBillSettleTerm.Visible = true;

                BillSettleTermDataBind();
                ((Literal)this.FV_FlowDetail.FindControl("lblNeedInspect")).Visible   = true;
                ((CheckBox)(this.FV_FlowDetail.FindControl("cbNeedInspect"))).Visible = true;

                Literal lblIdMark      = ((Literal)this.FV_FlowDetail.FindControl("lblIdMark"));
                TextBox tbIdMark       = ((TextBox)this.FV_FlowDetail.FindControl("tbIdMark"));
                Literal lblBarCodeType = ((Literal)this.FV_FlowDetail.FindControl("lblBarCodeType"));
                com.Sconit.Control.CodeMstrDropDownList ddlBarCodeType = (com.Sconit.Control.CodeMstrDropDownList) this.FV_FlowDetail.FindControl("ddlBarCodeType");

                lblIdMark.Visible      = true;
                tbIdMark.Visible       = true;
                lblBarCodeType.Visible = true;
                ddlBarCodeType.Visible = true;
            }
        }
        else if (this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_DISTRIBUTION)
        {
            lblBillSettleTerm.Visible = true;
            ddlBillSettleTerm.Visible = true;
            lblOddShipOption.Visible  = true;
            ddlOddShipOption.Visible  = true;

            BillSettleTermDataBind();
            this.FV_FlowDetail.FindControl("fdDistribution").Visible = true;
            Controls_TextBox tbLocFrom = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbDistributionLocFrom");
            tbLocFrom.ServiceParameter = "string:" + flow.PartyFrom.Code;
            tbLocFrom.DataBind();
            tbLocFrom.Text = string.Empty;
            this.FV_FlowDetail.FindControl("fdFordEDIOption").Visible = true;
        }
        else if (this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_PRODUCTION)
        {
            this.FV_FlowDetail.FindControl("fdProduction").Visible           = true;
            this.FV_FlowDetail.FindControl("trBom").Visible                  = true;
            this.FV_FlowDetail.FindControl("lblCustomer").Visible            = true;
            this.FV_FlowDetail.FindControl("lblCustomerItemCode").Visible    = true;
            this.FV_FlowDetail.FindControl("tbCustomerItemCode").Visible     = true;
            ((Controls_TextBox)this.FV_FlowDetail.FindControl("tbBom")).Text = string.Empty;
            ((TextBox)(this.FV_FlowDetail.FindControl("tbBatchSize"))).Text  = string.Empty;
            Controls_TextBox tbCustomer = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbCustomer");

            tbCustomer.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_CUSTOMERGOODS + ",string:" + this.CurrentUser.Code;
            tbCustomer.DataBind();
            tbCustomer.Visible = true;

            Controls_TextBox tbLocFrom = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbProductionLocFrom");
            tbLocFrom.ServiceParameter = "string:" + flow.PartyFrom.Code;
            tbLocFrom.DataBind();
            tbLocFrom.Text = string.Empty;
            Controls_TextBox tbLocTo = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbProductionLocTo");
            tbLocTo.ServiceParameter = "string:" + flow.PartyTo.Code;
            tbLocTo.DataBind();
            tbLocTo.Text = string.Empty;

            ((Literal)this.FV_FlowDetail.FindControl("lblNeedInspect")).Visible   = true;
            ((CheckBox)(this.FV_FlowDetail.FindControl("cbNeedInspect"))).Visible = true;

            Literal lblIdMark      = ((Literal)this.FV_FlowDetail.FindControl("lblIdMark"));
            TextBox tbIdMark       = ((TextBox)this.FV_FlowDetail.FindControl("tbIdMark"));
            Literal lblBarCodeType = ((Literal)this.FV_FlowDetail.FindControl("lblBarCodeType"));
            com.Sconit.Control.CodeMstrDropDownList ddlBarCodeType = (com.Sconit.Control.CodeMstrDropDownList) this.FV_FlowDetail.FindControl("ddlBarCodeType");

            lblIdMark.Visible      = true;
            tbIdMark.Visible       = true;
            lblBarCodeType.Visible = true;
            ddlBarCodeType.Visible = true;
            lblIdMark.Text         = "${MasterData.Flow.FlowDetail.IdMark.Production}";
            ddlBarCodeType.Code    = "FGBarCodeType";
            ddlBarCodeType.DataBind();
        }
        else if (this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_TRANSFER)
        {
            lblOddShipOption.Visible = true;
            ddlOddShipOption.Visible = true;
            this.FV_FlowDetail.FindControl("fdTransfer").Visible = true;
            Controls_TextBox tbLocFrom = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbTransferLocFrom");
            tbLocFrom.ServiceParameter = "string:" + flow.PartyFrom.Code;
            tbLocFrom.DataBind();
            tbLocFrom.Text = string.Empty;
            Controls_TextBox tbLocTo = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbTransferLocTo");
            tbLocTo.ServiceParameter = "string:" + flow.PartyTo.Code;
            tbLocTo.DataBind();
            tbLocTo.Text = string.Empty;
            this.FV_FlowDetail.FindControl("lblIsMrp").Visible = true;
            this.FV_FlowDetail.FindControl("cbIsMrp").Visible  = true;
        }
    }
Exemple #17
0
    protected void CV_ServerValidate(object source, ServerValidateEventArgs args)
    {
        CustomValidator cv = (CustomValidator)source;

        switch (cv.ID)
        {
        case "cvItem":

            if (TheItemMgr.LoadItem(args.Value.Trim()) == null)
            {
                ShowWarningMessage("MasterData.Item.Code.NotExist");
                args.IsValid = false;
            }
            else
            {
                Controls_TextBox tbUom = ((Controls_TextBox)(this.FV_Operation.FindControl("tbUom")));
                if (tbUom.Text.Trim() == "")
                {
                    ShowWarningMessage("Transportation.TransportPriceListDetail.Uom.Empty");
                    args.IsValid = false;
                }
            }
            break;

        case "cvUnitPrice":
            try
            {
                Convert.ToDecimal(args.Value);
            }
            catch (Exception)
            {
                ShowWarningMessage("Transportation.TransportPriceListDetail.UnitPrice.Error");
                args.IsValid = false;
            }
            break;

        case "cvCurrency":
            if (TheCurrencyMgr.LoadCurrency(args.Value) == null)
            {
                ShowWarningMessage("MasterData.Currency.Code.NotExist", args.Value);
                args.IsValid = false;
            }
            break;

        case "cvServiceCharge":
            try
            {
                Convert.ToDecimal(args.Value);
            }
            catch (Exception)
            {
                ShowWarningMessage("Transportation.TransportPriceListDetail.ServiceCharge.Error");
                args.IsValid = false;
            }
            break;

        case "cvEndDate":
            try
            {
                if (args.Value.Trim() != "")
                {
                    DateTime startDate = Convert.ToDateTime(((TextBox)(this.FV_Operation.FindControl("tbStartDate"))).Text.Trim());
                    if (DateTime.Compare(startDate, Convert.ToDateTime(args.Value)) > 0)
                    {
                        ShowErrorMessage("Transportation.TransportPriceListDetail.TimeCompare");
                        args.IsValid = false;
                    }
                }
            }
            catch (Exception)
            {
                ShowWarningMessage("Common.Date.Error");
                args.IsValid = false;
            }
            break;

        case "cvBillingMethod":
            TextBox          tbStartDate = ((TextBox)(this.FV_Operation.FindControl("tbStartDate")));
            TextBox          tbEndDate   = ((TextBox)(this.FV_Operation.FindControl("tbEndDate")));
            Controls_TextBox tbItem      = ((Controls_TextBox)(this.FV_Operation.FindControl("tbItem")));
            com.Sconit.Control.CodeMstrDropDownList ddlBillingMethod = ((com.Sconit.Control.CodeMstrDropDownList)(this.FV_Operation.FindControl("ddlBillingMethod")));

            IList <TransportPriceListDetail> transportPriceListDetailList = TheTransportPriceListDetailMgr.CheckOperation(this.TransportPriceListCode, tbStartDate.Text.Trim(), tbEndDate.Text.Trim(), tbItem.Text.Trim(), ddlBillingMethod.SelectedValue);
            if (transportPriceListDetailList != null && transportPriceListDetailList.Count > 0)
            {
                if (transportPriceListDetailList.Count > 1 || transportPriceListDetailList[0].Id.ToString() != this.TransportPriceListDetailId)
                {
                    ShowWarningMessage("Transportation.TransportPriceListDetail.ExistOperation");
                    args.IsValid = false;
                }
            }
            break;

        default:
            break;
        }
    }
Exemple #18
0
    protected void ODS_Flow_Updating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Flow flow    = (Flow)e.InputParameters[0];
        Flow oldFlow = TheFlowMgr.LoadFlow(FlowCode);

        CloneHelper.CopyProperty(oldFlow, flow, EditFields, true);

        Controls_TextBox tbRefFlow            = (Controls_TextBox)this.FV_Flow.FindControl("tbRefFlow");
        Controls_TextBox tbPartyFrom          = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyFrom");
        Controls_TextBox tbPartyTo            = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyTo");
        Controls_TextBox tbLocFrom            = (Controls_TextBox)this.FV_Flow.FindControl("tbLocFrom");
        Controls_TextBox tbLocTo              = (Controls_TextBox)this.FV_Flow.FindControl("tbLocTo");
        Controls_TextBox tbShipFrom           = (Controls_TextBox)this.FV_Flow.FindControl("tbShipFrom");
        Controls_TextBox tbShipTo             = (Controls_TextBox)this.FV_Flow.FindControl("tbShipTo");
        Controls_TextBox tbBillFrom           = (Controls_TextBox)this.FV_Flow.FindControl("tbBillFrom");
        Controls_TextBox tbCarrier            = (Controls_TextBox)this.FV_Flow.FindControl("tbCarrier");
        Controls_TextBox tbCarrierBillAddress = (Controls_TextBox)this.FV_Flow.FindControl("tbCarrierBillAddress");
        Controls_TextBox tbCurrency           = (Controls_TextBox)this.FV_Flow.FindControl("tbCurrency");
        Controls_TextBox tbPriceListFrom      = (Controls_TextBox)this.FV_Flow.FindControl("tbPriceListFrom");

        com.Sconit.Control.CodeMstrDropDownList ddlGrGapTo           = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlGrGapTo");
        com.Sconit.Control.CodeMstrDropDownList ddlCheckDetailOption = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlCheckDetailOption"));
        com.Sconit.Control.CodeMstrDropDownList ddlOrderTemplate     = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlOrderTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlAsnTemplate       = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlAsnTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlReceiptTemplate   = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlReceiptTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlHuTemplate        = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlHuTemplate"));

        DropDownList ddlBillSettleTerm = (DropDownList)this.FV_Flow.FindControl("ddlBillSettleTerm");

        com.Sconit.Control.CodeMstrDropDownList ddlCreateHuOption = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlCreateHuOption");
        com.Sconit.Control.CodeMstrDropDownList ddlAntiResolveHu  = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlAntiResolveHu");


        if (tbRefFlow != null && tbRefFlow.Text.Trim() != string.Empty)
        {
            flow.ReferenceFlow = TheFlowMgr.CheckAndLoadFlow(tbRefFlow.Text.Trim()).Code;
        }
        if (tbPartyFrom != null && tbPartyFrom.Text.Trim() != string.Empty)
        {
            flow.PartyFrom = ThePartyMgr.LoadParty(tbPartyFrom.Text.Trim());
        }

        if (tbPartyTo != null && tbPartyTo.Text.Trim() != string.Empty)
        {
            flow.PartyTo = ThePartyMgr.LoadParty(tbPartyTo.Text.Trim());
        }
        if (tbLocTo != null && tbLocTo.Text.Trim() != string.Empty)
        {
            flow.LocationTo = TheLocationMgr.LoadLocation(tbLocTo.Text.Trim());
        }
        if (tbShipFrom != null && tbShipFrom.Text.Trim() != string.Empty)
        {
            flow.ShipFrom = TheAddressMgr.LoadShipAddress(tbShipFrom.Text.Trim());
        }
        if (tbShipTo != null && tbShipTo.Text.Trim() != string.Empty)
        {
            flow.ShipTo = TheAddressMgr.LoadShipAddress(tbShipTo.Text.Trim());
        }

        if (tbBillFrom != null && tbBillFrom.Text.Trim() != string.Empty)
        {
            flow.BillFrom = TheAddressMgr.LoadBillAddress(tbBillFrom.Text.Trim());
        }
        if (ddlBillSettleTerm.SelectedIndex != -1)
        {
            flow.BillSettleTerm = ddlBillSettleTerm.SelectedValue;
        }
        if (ddlCreateHuOption.SelectedIndex != -1)
        {
            flow.CreateHuOption = ddlCreateHuOption.SelectedValue;
        }

        if (tbCarrier != null && tbCarrier.Text.Trim() != string.Empty)
        {
            flow.Carrier = TheCarrierMgr.LoadCarrier(tbCarrier.Text.Trim());
        }
        if (tbCarrierBillAddress != null && tbCarrierBillAddress.Text.Trim() != string.Empty)
        {
            flow.CarrierBillAddress = TheAddressMgr.LoadBillAddress(tbCarrierBillAddress.Text.Trim());
        }
        if (ddlGrGapTo.SelectedIndex != -1)
        {
            flow.GoodsReceiptGapTo = ddlGrGapTo.SelectedValue;
        }
        if (ddlCheckDetailOption.SelectedIndex != -1)
        {
            flow.CheckDetailOption = ddlCheckDetailOption.SelectedValue;
        }
        if (ddlOrderTemplate.SelectedIndex != -1)
        {
            flow.OrderTemplate = ddlOrderTemplate.SelectedValue;
        }
        if (ddlAsnTemplate.SelectedIndex != -1)
        {
            flow.AsnTemplate = ddlAsnTemplate.SelectedValue;
        }
        if (ddlReceiptTemplate.SelectedIndex != -1)
        {
            flow.ReceiptTemplate = ddlReceiptTemplate.SelectedValue;
        }
        if (ddlHuTemplate.SelectedIndex != -1)
        {
            flow.HuTemplate = ddlHuTemplate.SelectedValue;
        }
        if (ddlAntiResolveHu.SelectedIndex != -1)
        {
            flow.AntiResolveHu = ddlAntiResolveHu.SelectedValue;
        }

        if (tbPriceListFrom != null && tbPriceListFrom.Text.Trim() != string.Empty)
        {
            flow.PriceListFrom = ThePurchasePriceListMgr.LoadPurchasePriceList(tbPriceListFrom.Text.Trim());
        }

        if (tbCurrency != null && tbCurrency.Text.Trim() != string.Empty)
        {
            flow.Currency = TheCurrencyMgr.LoadCurrency(tbCurrency.Text.Trim());
        }
        else
        {
            string currencyCode = TheEntityPreferenceMgr.LoadEntityPreference(BusinessConstants.ENTITY_PREFERENCE_CODE_BASE_CURRENCY).Value;
            flow.Currency = TheCurrencyMgr.LoadCurrency(currencyCode);
        }

        flow.LastModifyUser = this.CurrentUser;
        flow.LastModifyDate = DateTime.Now;
        flow.Version       += 1;
    }
Exemple #19
0
    protected void ODS_FlowDetail_Updating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        FlowDetail flowDetail    = (FlowDetail)e.InputParameters[0];
        FlowDetail oldFLowDetail = TheFlowDetailMgr.LoadFlowDetail(this.FlowDetailId);
        Flow       flow          = TheFlowMgr.LoadFlow(FlowCode, true);

        flowDetail.Flow           = flow;
        flowDetail.CreateDate     = oldFLowDetail.CreateDate;
        flowDetail.CreateUser     = oldFLowDetail.CreateUser;
        flowDetail.LastModifyDate = DateTime.Now;
        flowDetail.LastModifyUser = this.CurrentUser;
        flowDetail.Version        = oldFLowDetail.Version + 1;

        //seq
        if (flowDetail.Sequence == 0)
        {
            flowDetail.Sequence = TheFlowDetailMgr.LoadFlowDetail(this.FlowDetailId).Sequence;
        }
        Controls_TextBox tbItemCode = (Controls_TextBox)(this.FV_FlowDetail.FindControl("tbItemCode"));
        Controls_TextBox tbUom      = (Controls_TextBox)(this.FV_FlowDetail.FindControl("tbUom"));

        if (tbItemCode != null && tbItemCode.Text.Trim() != string.Empty)
        {
            flowDetail.Item = TheItemMgr.LoadItem(tbItemCode.Text.Trim());
        }

        if (tbUom != null && tbUom.Text.Trim() != string.Empty)
        {
            flowDetail.Uom = TheUomMgr.LoadUom(tbUom.Text.Trim());
        }

        if (this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_PROCUREMENT ||
            this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_CUSTOMERGOODS ||
            this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_SUBCONCTRACTING)
        {
            Controls_TextBox tbLocTo = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbProcurementLocTo");
            if (tbLocTo != null && tbLocTo.Text.Trim() != string.Empty)
            {
                flowDetail.LocationTo = TheLocationMgr.LoadLocation(tbLocTo.Text.Trim());
            }
            //djin 20120802 保存参考物料号
            Controls_TextBox tbRefItemCode = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbRefItemCode");
            if (tbRefItemCode != null && tbRefItemCode.Text.Trim() != string.Empty)
            {
                flowDetail.ReferenceItemCode = tbRefItemCode.Text.Trim();
            }
            //end
            if (this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_PROCUREMENT)
            {
                DropDownList ddlBillSettleTerm = (DropDownList)this.FV_FlowDetail.FindControl("ddlBillSettleTerm");
                if (ddlBillSettleTerm.SelectedIndex != -1)
                {
                    if (ddlBillSettleTerm.SelectedValue == string.Empty)
                    {
                        flowDetail.BillSettleTerm = null;
                    }
                    else
                    {
                        flowDetail.BillSettleTerm = ddlBillSettleTerm.SelectedValue;
                    }
                }
                com.Sconit.Control.CodeMstrDropDownList ddlBarCodeType = (com.Sconit.Control.CodeMstrDropDownList) this.FV_FlowDetail.FindControl("ddlBarCodeType");
                if (ddlBarCodeType.SelectedIndex != -1)
                {
                    flowDetail.BarCodeType = ddlBarCodeType.SelectedValue;
                }
            }
        }
        else if (this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_DISTRIBUTION)
        {
            Controls_TextBox tbLocFrom = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbDistributionLocFrom");
            if (tbLocFrom != null && tbLocFrom.Text.Trim() != string.Empty)
            {
                flowDetail.LocationFrom = TheLocationMgr.LoadLocation(tbLocFrom.Text.Trim());
            }
            DropDownList ddlBillSettleTerm = (DropDownList)this.FV_FlowDetail.FindControl("ddlBillSettleTerm");
            if (ddlBillSettleTerm.SelectedIndex != -1)
            {
                flowDetail.BillSettleTerm = ddlBillSettleTerm.SelectedValue;
            }

            DropDownList ddlOddShipOption = (DropDownList)this.FV_FlowDetail.FindControl("ddlOddShipOption");
            if (ddlOddShipOption.SelectedIndex != -1)
            {
                flowDetail.OddShipOption = ddlOddShipOption.SelectedValue;
            }
            flowDetail.PackagingCode = ((System.Web.UI.HtmlControls.HtmlSelect) this.FV_FlowDetail.FindControl("tbPackagingCode")).Value;
            flowDetail.TransModeCode = ((System.Web.UI.HtmlControls.HtmlSelect) this.FV_FlowDetail.FindControl("tbTransModeCode")).Value;
        }
        else if (this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_PRODUCTION)
        {
            Controls_TextBox tbBom = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbBom");
            if (tbBom != null && tbBom.Text.Trim() != string.Empty)
            {
                flowDetail.Bom = TheBomMgr.LoadBom(tbBom.Text.Trim());
            }

            TextBox          tbBatchSize = (TextBox)this.FV_FlowDetail.FindControl("tbBatchSize");
            Controls_TextBox tbLocFrom   = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbProductionLocFrom");
            if (tbBatchSize.Text.Trim() != string.Empty)
            {
                flowDetail.BatchSize = decimal.Parse(tbBatchSize.Text.Trim());
            }
            if (tbLocFrom != null && tbLocFrom.Text.Trim() != string.Empty)
            {
                flowDetail.LocationFrom = TheLocationMgr.LoadLocation(tbLocFrom.Text.Trim());
            }
            Controls_TextBox tbLocTo = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbProductionLocTo");
            if (tbLocTo != null && tbLocTo.Text.Trim() != string.Empty)
            {
                flowDetail.LocationTo = TheLocationMgr.LoadLocation(tbLocTo.Text.Trim());
            }
            Controls_TextBox tbCustomer = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbCustomer");
            if (tbCustomer != null && tbCustomer.Text.Trim() != string.Empty)
            {
                flowDetail.Customer = TheCustomerMgr.LoadCustomer(tbCustomer.Text.Trim());
            }
            com.Sconit.Control.CodeMstrDropDownList ddlBarCodeType = (com.Sconit.Control.CodeMstrDropDownList) this.FV_FlowDetail.FindControl("ddlBarCodeType");
            if (ddlBarCodeType.SelectedIndex != -1)
            {
                flowDetail.BarCodeType = ddlBarCodeType.SelectedValue;
            }
        }
        else if (this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_TRANSFER)
        {
            Controls_TextBox tbLocFrom = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbTransferLocFrom");
            if (tbLocFrom != null && tbLocFrom.Text.Trim() != string.Empty)
            {
                flowDetail.LocationFrom = TheLocationMgr.LoadLocation(tbLocFrom.Text.Trim());
            }
            Controls_TextBox tbLocTo = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbTransferLocTo");
            if (tbLocTo != null && tbLocTo.Text.Trim() != string.Empty)
            {
                flowDetail.LocationTo = TheLocationMgr.LoadLocation(tbLocTo.Text.Trim());
            }

            DropDownList ddlOddShipOption = (DropDownList)this.FV_FlowDetail.FindControl("ddlOddShipOption");
            if (ddlOddShipOption.SelectedIndex != -1)
            {
                flowDetail.OddShipOption = ddlOddShipOption.SelectedValue;
            }
        }
    }
Exemple #20
0
    protected void ODS_Flow_Updating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Flow flow    = (Flow)e.InputParameters[0];
        Flow oldFlow = TheFlowMgr.LoadFlow(FlowCode);

        CloneHelper.CopyProperty(oldFlow, flow, EditFields, true);

        Controls_TextBox tbRefFlow   = (Controls_TextBox)this.FV_Flow.FindControl("tbRefFlow");
        Controls_TextBox tbPartyFrom = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyFrom");

        Controls_TextBox tbLocFrom = (Controls_TextBox)this.FV_Flow.FindControl("tbLocFrom");
        Controls_TextBox tbLocTo   = (Controls_TextBox)this.FV_Flow.FindControl("tbLocTo");

        com.Sconit.Control.CodeMstrDropDownList ddlOrderTemplate   = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlOrderTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlReceiptTemplate = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlReceiptTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlHuTemplate      = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlHuTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlCreateHuOption  = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlCreateHuOption");
        com.Sconit.Control.CodeMstrDropDownList ddlMrpOption       = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlMrpOption");


        if (tbRefFlow != null && tbRefFlow.Text.Trim() != string.Empty)
        {
            flow.ReferenceFlow = TheFlowMgr.CheckAndLoadFlow(tbRefFlow.Text.Trim()).Code;
        }
        if (tbPartyFrom != null && tbPartyFrom.Text.Trim() != string.Empty)
        {
            flow.PartyFrom = ThePartyMgr.LoadParty(tbPartyFrom.Text.Trim());
        }
        if (tbLocFrom != null && tbLocFrom.Text.Trim() != string.Empty)
        {
            flow.LocationFrom = TheLocationMgr.LoadLocation(tbLocFrom.Text.Trim());
        }
        if (tbLocTo != null && tbLocTo.Text.Trim() != string.Empty)
        {
            flow.LocationTo = TheLocationMgr.LoadLocation(tbLocTo.Text.Trim());
        }
        if (ddlOrderTemplate.SelectedIndex != -1)
        {
            flow.OrderTemplate = ddlOrderTemplate.SelectedValue;
        }
        if (ddlReceiptTemplate.SelectedIndex != -1)
        {
            flow.ReceiptTemplate = ddlReceiptTemplate.SelectedValue;
        }
        if (ddlHuTemplate.SelectedIndex != -1)
        {
            flow.HuTemplate = ddlHuTemplate.SelectedValue;
        }
        if (ddlCreateHuOption.SelectedIndex != -1)
        {
            flow.CreateHuOption = ddlCreateHuOption.SelectedValue;
        }
        if (ddlMrpOption.SelectedIndex != -1)
        {
            flow.MRPOption = ddlMrpOption.SelectedValue;
        }
        flow.BillSettleTerm    = null;
        flow.CheckDetailOption = BusinessConstants.CODE_MASTER_CHECK_ORDER_DETAIL_OPTION_VALUE_NOT_CHECK;
        flow.PartyTo           = flow.PartyFrom;
        flow.LastModifyUser    = this.CurrentUser;
        flow.LastModifyDate    = DateTime.Now;
        flow.Version          += 1;
    }
Exemple #21
0
    private TransportationOrder PrepareOrder()
    {
        TransportationOrder order = TheTransportationOrderMgr.LoadTransportationOrder(this.OrderNo);

        Controls_TextBox tbCarrier = (Controls_TextBox)(this.FV_Order.FindControl("tbCarrier"));

        if (tbCarrier.Text.Trim() != string.Empty)
        {
            order.Carrier = TheCarrierMgr.LoadCarrier(tbCarrier.Text.Trim());
        }

        Controls_TextBox tbCarrierBillAddress = (Controls_TextBox)(this.FV_Order.FindControl("tbCarrierBillAddress"));

        if (tbCarrierBillAddress.Text.Trim() != string.Empty)
        {
            order.CarrierBillAddress = TheBillAddressMgr.LoadBillAddress(tbCarrierBillAddress.Text.Trim());
        }
        else
        {
            order.CarrierBillAddress = TheBillAddressMgr.GetDefaultBillAddress(order.Carrier.Code);
        }


        Controls_TextBox tbVehicle = (Controls_TextBox)(this.FV_Order.FindControl("tbVehicle"));

        order.Vehicle = tbVehicle.Text.Trim();

        Controls_TextBox tbExpense = (Controls_TextBox)(this.FV_Order.FindControl("tbExpense"));

        order.Expense = TheExpenseMgr.LoadExpense(tbExpense.Text.Trim());

        DropDownList ddlType = (DropDownList)(this.FV_Order.FindControl("ddlType"));

        if (ddlType.SelectedValue != string.Empty)
        {
            order.VehicleType = ddlType.SelectedValue;
        }

        com.Sconit.Control.CodeMstrDropDownList ddlPricingMethod = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Order.FindControl("ddlPricingMethod"));
        if (ddlPricingMethod.SelectedValue != string.Empty)
        {
            order.PricingMethod = ddlPricingMethod.SelectedValue;
        }
        order.VehicleDriver  = ((TextBox)(this.FV_Order.FindControl("tbDriver"))).Text.Trim();
        order.PallentCount   = Int32.Parse(((TextBox)(this.FV_Order.FindControl("tbPallentCount"))).Text.Trim());
        order.LastModifyDate = DateTime.Now;
        order.LastModifyUser = this.CurrentUser;
        order.Remark         = ((TextBox)(this.FV_Order.FindControl("tbRemark"))).Text.Trim();

        //add by ljz start
        com.Sconit.Control.CodeMstrDropDownList ddlTransportMethod = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Order.FindControl("ddlTransportMethod"));
        if (ddlTransportMethod.SelectedValue != string.Empty)
        {
            order.TransportMethod = ddlTransportMethod.SelectedValue;
        }
        //add by ljz end

        //added by [email protected]
        order.ReferencePallentCount = ((CheckBox)(this.FV_Order.FindControl("IsExcess"))).Checked ? 1 : 0;
        //added end
        return(order);
    }
Exemple #22
0
    protected void ODS_Flow_Updating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Flow flow    = (Flow)e.InputParameters[0];
        Flow oldFlow = TheFlowMgr.LoadFlow(FlowCode);

        CloneHelper.CopyProperty(oldFlow, flow, EditFields, true);

        Controls_TextBox tbRefFlow            = (Controls_TextBox)this.FV_Flow.FindControl("tbRefFlow");
        Controls_TextBox tbPartyFrom          = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyFrom");
        Controls_TextBox tbPartyTo            = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyTo");
        Controls_TextBox tbLocFrom            = (Controls_TextBox)this.FV_Flow.FindControl("tbLocFrom");
        Controls_TextBox tbLocTo              = (Controls_TextBox)this.FV_Flow.FindControl("tbLocTo");
        Controls_TextBox tbShipFrom           = (Controls_TextBox)this.FV_Flow.FindControl("tbShipFrom");
        Controls_TextBox tbShipTo             = (Controls_TextBox)this.FV_Flow.FindControl("tbShipTo");
        Controls_TextBox tbCarrier            = (Controls_TextBox)this.FV_Flow.FindControl("tbCarrier");
        Controls_TextBox tbCarrierBillAddress = (Controls_TextBox)this.FV_Flow.FindControl("tbCarrierBillAddress");

        com.Sconit.Control.CodeMstrDropDownList ddlGrGapTo           = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlGrGapTo");
        com.Sconit.Control.CodeMstrDropDownList ddlCheckDetailOption = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlCheckDetailOption"));
        com.Sconit.Control.CodeMstrDropDownList ddlOrderTemplate     = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlOrderTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlAsnTemplate       = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlAsnTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlReceiptTemplate   = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlReceiptTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlHuTemplate        = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlHuTemplate"));

        com.Sconit.Control.CodeMstrDropDownList ddlCreateHuOption = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlCreateHuOption");


        if (tbRefFlow != null && tbRefFlow.Text.Trim() != string.Empty)
        {
            flow.ReferenceFlow = TheFlowMgr.CheckAndLoadFlow(tbRefFlow.Text.Trim()).Code;
        }
        if (tbPartyFrom != null && tbPartyFrom.Text.Trim() != string.Empty)
        {
            flow.PartyFrom = ThePartyMgr.LoadParty(tbPartyFrom.Text.Trim());
        }

        if (tbPartyTo != null && tbPartyTo.Text.Trim() != string.Empty)
        {
            flow.PartyTo = ThePartyMgr.LoadParty(tbPartyTo.Text.Trim());
        }
        if (tbLocTo != null && tbLocTo.Text.Trim() != string.Empty)
        {
            flow.LocationTo = TheLocationMgr.LoadLocation(tbLocTo.Text.Trim());
        }
        if (tbShipFrom != null && tbShipFrom.Text.Trim() != string.Empty)
        {
            flow.ShipFrom = TheAddressMgr.LoadShipAddress(tbShipFrom.Text.Trim());
        }
        if (tbShipTo != null && tbShipTo.Text.Trim() != string.Empty)
        {
            flow.ShipTo = TheAddressMgr.LoadShipAddress(tbShipTo.Text.Trim());
        }


        if (tbCarrier != null && tbCarrier.Text.Trim() != string.Empty)
        {
            flow.Carrier = TheCarrierMgr.LoadCarrier(tbCarrier.Text.Trim());
        }
        if (tbCarrierBillAddress != null && tbCarrierBillAddress.Text.Trim() != string.Empty)
        {
            flow.CarrierBillAddress = TheAddressMgr.LoadBillAddress(tbCarrierBillAddress.Text.Trim());
        }
        if (ddlGrGapTo.SelectedIndex != -1)
        {
            flow.GoodsReceiptGapTo = ddlGrGapTo.SelectedValue;
        }
        if (ddlCheckDetailOption.SelectedIndex != -1)
        {
            flow.CheckDetailOption = ddlCheckDetailOption.SelectedValue;
        }
        if (ddlOrderTemplate.SelectedIndex != -1)
        {
            flow.OrderTemplate = ddlOrderTemplate.SelectedValue;
        }
        if (ddlAsnTemplate.SelectedIndex != -1)
        {
            flow.AsnTemplate = ddlAsnTemplate.SelectedValue;
        }
        if (ddlReceiptTemplate.SelectedIndex != -1)
        {
            flow.ReceiptTemplate = ddlReceiptTemplate.SelectedValue;
        }
        if (ddlHuTemplate.SelectedIndex != -1)
        {
            flow.HuTemplate = ddlHuTemplate.SelectedValue;
        }
        if (ddlCreateHuOption.SelectedIndex != -1)
        {
            flow.CreateHuOption = ddlCreateHuOption.SelectedValue;
        }
        flow.LastModifyUser = this.CurrentUser;
        flow.LastModifyDate = DateTime.Now;
        flow.Version       += 1;
    }
Exemple #23
0
    protected void FV_FlowDetail_DataBound(object sender, EventArgs e)
    {
        if (FlowDetailId == 0)
        {
            return;
        }

        FlowDetail flowDetail = TheFlowDetailMgr.LoadFlowDetail(FlowDetailId);
        Flow       flow       = flowDetail.Flow;

        ((Controls_TextBox)(this.FV_FlowDetail.FindControl("tbItemCode"))).Text = flowDetail.Item.Code;

        if (flowDetail.Uom != null)
        {
            ((Controls_TextBox)(this.FV_FlowDetail.FindControl("tbUom"))).Text = flowDetail.Uom.Code;
        }

        Controls_TextBox tbRefItemCode = (Controls_TextBox)(this.FV_FlowDetail.FindControl("tbRefItemCode"));

        tbRefItemCode.Text             = flowDetail.ReferenceItemCode;//djin 20120802  参考物料号
        tbRefItemCode.ServiceParameter = "string:#tbItemCode,string:" + flow.PartyFrom.Code + ",string:" + flow.PartyTo.Code;
        tbRefItemCode.DataBind();



        if (this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_PROCUREMENT ||
            this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_CUSTOMERGOODS ||
            this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_SUBCONCTRACTING)
        {
            this.FV_FlowDetail.FindControl("fdProcurement").Visible = true;
            Controls_TextBox tbLocTo = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbProcurementLocTo");
            tbLocTo.ServiceParameter = "string:" + flow.PartyTo.Code;
            tbLocTo.DataBind();
            tbLocTo.Text = flowDetail.LocationTo == null ? string.Empty : flowDetail.LocationTo.Code;

            if (this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_PROCUREMENT ||
                this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_SUBCONCTRACTING)
            {
                BillSettleTermDataBind();
                DropDownList ddlBillSettleTerm = (DropDownList)this.FV_FlowDetail.FindControl("ddlBillSettleTerm");
                ddlBillSettleTerm.Text = flowDetail.BillSettleTerm;

                ddlBillSettleTerm.Visible = true;
                this.FV_FlowDetail.FindControl("lblBillSettleTerm").Visible = true;

                ((Literal)this.FV_FlowDetail.FindControl("lblNeedInspect")).Visible   = true;
                ((CheckBox)(this.FV_FlowDetail.FindControl("cbNeedInspect"))).Visible = true;


                Literal lblIdMark      = ((Literal)this.FV_FlowDetail.FindControl("lblIdMark"));
                TextBox tbIdMark       = ((TextBox)this.FV_FlowDetail.FindControl("tbIdMark"));
                Literal lblBarCodeType = ((Literal)this.FV_FlowDetail.FindControl("lblBarCodeType"));
                com.Sconit.Control.CodeMstrDropDownList ddlBarCodeType = (com.Sconit.Control.CodeMstrDropDownList) this.FV_FlowDetail.FindControl("ddlBarCodeType");

                lblIdMark.Visible      = true;
                tbIdMark.Visible       = true;
                lblBarCodeType.Visible = true;
                ddlBarCodeType.Visible = true;
                if (flowDetail.BarCodeType != string.Empty)
                {
                    ddlBarCodeType.Text = flowDetail.BarCodeType;
                }
            }
        }

        else if (this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_DISTRIBUTION)
        {
            BillSettleTermDataBind();
            DropDownList ddlBillSettleTerm = (DropDownList)this.FV_FlowDetail.FindControl("ddlBillSettleTerm");
            ddlBillSettleTerm.Text    = flowDetail.BillSettleTerm;
            ddlBillSettleTerm.Visible = true;
            this.FV_FlowDetail.FindControl("lblBillSettleTerm").Visible = true;

            DropDownList ddlOddShipOption = (DropDownList)this.FV_FlowDetail.FindControl("ddlOddShipOption");
            ddlOddShipOption.Text    = flowDetail.OddShipOption;
            ddlOddShipOption.Visible = true;
            this.FV_FlowDetail.FindControl("lblOddShipOption").Visible = true;

            this.FV_FlowDetail.FindControl("fdDistribution").Visible = true;
            Controls_TextBox tbLocFrom = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbDistributionLocFrom");
            tbLocFrom.ServiceParameter = "string:" + flow.PartyFrom.Code;
            tbLocFrom.DataBind();
            tbLocFrom.Text = flowDetail.LocationFrom == null ? string.Empty : flowDetail.LocationFrom.Code;

            this.FV_FlowDetail.FindControl("fdFordEDIOption").Visible = true;
            ((System.Web.UI.HtmlControls.HtmlSelect) this.FV_FlowDetail.FindControl("tbPackagingCode")).Value = flowDetail.PackagingCode;
            ((System.Web.UI.HtmlControls.HtmlSelect) this.FV_FlowDetail.FindControl("tbTransModeCode")).Value = flowDetail.TransModeCode;
        }
        else if (this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_PRODUCTION)
        {
            this.FV_FlowDetail.FindControl("fdProduction").Visible           = true;
            this.FV_FlowDetail.FindControl("trBom").Visible                  = true;
            this.FV_FlowDetail.FindControl("lblCustomer").Visible            = true;
            this.FV_FlowDetail.FindControl("lblCustomerItemCode").Visible    = true;
            this.FV_FlowDetail.FindControl("tbCustomerItemCode").Visible     = true;
            ((Controls_TextBox)this.FV_FlowDetail.FindControl("tbBom")).Text = flowDetail.Bom == null ? string.Empty : flowDetail.Bom.Code;
            ((TextBox)(this.FV_FlowDetail.FindControl("tbBatchSize"))).Text  = string.Empty;
            Controls_TextBox tbCustomer = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbCustomer");
            tbCustomer.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_CUSTOMERGOODS + ",string:" + this.CurrentUser.Code;
            tbCustomer.DataBind();
            tbCustomer.Visible = true;
            tbCustomer.Text    = flowDetail.Customer == null ? string.Empty : flowDetail.Customer.Code;
            Controls_TextBox tbLocFrom = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbProductionLocFrom");
            tbLocFrom.ServiceParameter = "string:" + flow.PartyFrom.Code;
            tbLocFrom.DataBind();
            tbLocFrom.Text = flowDetail.LocationFrom == null ? string.Empty : flowDetail.LocationFrom.Code;
            Controls_TextBox tbLocTo = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbProductionLocTo");
            tbLocTo.ServiceParameter = "string:" + flow.PartyTo.Code;
            tbLocTo.DataBind();
            tbLocTo.Text = flowDetail.LocationTo == null ? string.Empty : flowDetail.LocationTo.Code;

            ((Literal)this.FV_FlowDetail.FindControl("lblNeedInspect")).Visible   = true;
            ((CheckBox)(this.FV_FlowDetail.FindControl("cbNeedInspect"))).Visible = true;

            Literal lblIdMark      = ((Literal)this.FV_FlowDetail.FindControl("lblIdMark"));
            TextBox tbIdMark       = ((TextBox)this.FV_FlowDetail.FindControl("tbIdMark"));
            Literal lblBarCodeType = ((Literal)this.FV_FlowDetail.FindControl("lblBarCodeType"));
            com.Sconit.Control.CodeMstrDropDownList ddlBarCodeType = (com.Sconit.Control.CodeMstrDropDownList) this.FV_FlowDetail.FindControl("ddlBarCodeType");

            lblIdMark.Visible      = true;
            tbIdMark.Visible       = true;
            lblBarCodeType.Visible = true;
            ddlBarCodeType.Visible = true;
            lblIdMark.Text         = "${MasterData.Flow.FlowDetail.IdMark.Production}";
            ddlBarCodeType.Code    = "FGBarCodeType";
            ddlBarCodeType.DataBind();
            if (flowDetail.BarCodeType != string.Empty)
            {
                ddlBarCodeType.Text = flowDetail.BarCodeType;
            }
        }
        else if (this.ModuleType == BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_TRANSFER)
        {
            this.FV_FlowDetail.FindControl("fdTransfer").Visible = true;

            DropDownList ddlOddShipOption = (DropDownList)this.FV_FlowDetail.FindControl("ddlOddShipOption");
            ddlOddShipOption.Text    = flowDetail.OddShipOption;
            ddlOddShipOption.Visible = true;
            this.FV_FlowDetail.FindControl("lblOddShipOption").Visible = true;

            Controls_TextBox tbLocFrom = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbTransferLocFrom");
            tbLocFrom.ServiceParameter = "string:" + flow.PartyFrom.Code;
            tbLocFrom.DataBind();
            tbLocFrom.Text = flowDetail.LocationFrom == null ? string.Empty : flowDetail.LocationFrom.Code;
            Controls_TextBox tbLocTo = (Controls_TextBox)this.FV_FlowDetail.FindControl("tbTransferLocTo");
            tbLocTo.ServiceParameter = "string:" + flow.PartyTo.Code;
            tbLocTo.DataBind();
            tbLocTo.Text = flowDetail.LocationTo == null ? string.Empty : flowDetail.LocationTo.Code;
            this.FV_FlowDetail.FindControl("lblIsMrp").Visible = true;
            this.FV_FlowDetail.FindControl("cbIsMrp").Visible  = true;
        }
    }
Exemple #24
0
    protected void ODS_Item_Updating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        Item item = (Item)e.InputParameters[0];

        item.Desc1 = item.Desc1.Trim();
        item.Desc2 = item.Desc2.Trim();
        item.Memo  = item.Memo.Trim();

        item.Type = ((CodeMstrDropDownList)(this.FV_Item.FindControl("ddlType"))).SelectedValue;

        string uom = ((TextBox)(this.FV_Item.FindControl("tbUom"))).Text.Trim();

        item.Uom = TheUomMgr.LoadUom(uom);

        string location = ((Controls_TextBox)(this.FV_Item.FindControl("tbLocation"))).Text.Trim();

        item.Location = TheLocationMgr.LoadLocation(location);

        string bom = ((Controls_TextBox)(this.FV_Item.FindControl("tbBom"))).Text.Trim();

        item.Bom = TheBomMgr.LoadBom(bom);

        string routing = ((Controls_TextBox)(this.FV_Item.FindControl("tbRouting"))).Text.Trim();

        item.Routing = TheRoutingMgr.LoadRouting(routing);

        string plant = ((CodeMstrDropDownList)(this.FV_Item.FindControl("ddlPlantType"))).Text.Trim();

        item.Plant = plant;

        decimal uc = item.UnitCount;

        uc = System.Decimal.Round(uc, 8);
        if (uc == 0)
        {
            ShowErrorMessage("MasterData.Item.UC.Zero");
            e.Cancel = true;
        }

        com.Sconit.Control.CodeMstrDropDownList ddlItemCategory = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Item.FindControl("ddlItemCategory"));
        if (ddlItemCategory.SelectedIndex != 0)
        {
            item.Category = ddlItemCategory.SelectedValue;
        }

        string imageUrl;
        string imgUpload = ((System.Web.UI.WebControls.Image)(this.FV_Item.FindControl("imgUpload"))).ImageUrl;

        if (((CheckBox)(this.FV_Item.FindControl("cbDeleteImage"))).Checked == true)
        {
            imageUrl = null;
            if (File.Exists(Server.MapPath(imgUpload)))
            {
                File.Delete(Server.MapPath(imgUpload));
            }
        }
        else
        {
            imageUrl = UploadItemImage(item.Code);
            if (imageUrl == null)
            {
                imageUrl = imgUpload;
            }
        }

        item.ImageUrl       = imageUrl;
        item.LastModifyDate = DateTime.Now;
        item.LastModifyUser = this.CurrentUser;
    }
Exemple #25
0
    protected void ODS_Flow_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
    {
        flow = (Flow)e.InputParameters[0];

        Controls_TextBox tbRefFlow            = (Controls_TextBox)this.FV_Flow.FindControl("tbRefFlow");
        Controls_TextBox tbPartyFrom          = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyFrom");
        Controls_TextBox tbPartyTo            = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyTo");
        Controls_TextBox tbLocTo              = (Controls_TextBox)this.FV_Flow.FindControl("tbLocTo");
        Controls_TextBox tbShipFrom           = (Controls_TextBox)this.FV_Flow.FindControl("tbShipFrom");
        Controls_TextBox tbShipTo             = (Controls_TextBox)this.FV_Flow.FindControl("tbShipTo");
        Controls_TextBox tbBillFrom           = (Controls_TextBox)this.FV_Flow.FindControl("tbBillFrom");
        Controls_TextBox tbCarrier            = (Controls_TextBox)this.FV_Flow.FindControl("tbCarrier");
        Controls_TextBox tbCarrierBillAddress = (Controls_TextBox)this.FV_Flow.FindControl("tbCarrierBillAddress");
        Controls_TextBox tbCurrency           = (Controls_TextBox)this.FV_Flow.FindControl("tbCurrency");
        Controls_TextBox tbPriceListFrom      = (Controls_TextBox)this.FV_Flow.FindControl("tbPriceListFrom");

        com.Sconit.Control.CodeMstrDropDownList ddlGrGapTo           = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlGrGapTo");
        com.Sconit.Control.CodeMstrDropDownList ddlCheckDetailOption = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlCheckDetailOption");
        com.Sconit.Control.CodeMstrDropDownList ddlOrderTemplate     = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlOrderTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlAsnTemplate       = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlAsnTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlReceiptTemplate   = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlReceiptTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlHuTemplate        = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlHuTemplate"));

        com.Sconit.Control.CodeMstrDropDownList ddlCreateHuOption = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlCreateHuOption");


        if (tbRefFlow != null && tbRefFlow.Text.Trim() != string.Empty)
        {
            flow.ReferenceFlow = TheFlowMgr.CheckAndLoadFlow(tbRefFlow.Text.Trim()).Code;
        }

        if (tbPartyFrom != null && tbPartyFrom.Text.Trim() != string.Empty)
        {
            flow.PartyFrom = ThePartyMgr.LoadParty(tbPartyFrom.Text.Trim());
        }

        if (tbPartyTo != null && tbPartyTo.Text.Trim() != string.Empty)
        {
            flow.PartyTo = ThePartyMgr.LoadParty(tbPartyTo.Text.Trim());
        }


        if (tbLocTo != null && tbLocTo.Text.Trim() != string.Empty)
        {
            flow.LocationTo = TheLocationMgr.LoadLocation(tbLocTo.Text.Trim());
        }

        if (tbShipFrom != null && tbShipFrom.Text.Trim() != string.Empty)
        {
            flow.ShipFrom = TheAddressMgr.LoadShipAddress(tbShipFrom.Text.Trim());
        }

        if (tbShipTo != null && tbShipTo.Text.Trim() != string.Empty)
        {
            flow.ShipTo = TheAddressMgr.LoadShipAddress(tbShipTo.Text.Trim());
        }
        if (ddlCreateHuOption.SelectedIndex != -1)
        {
            flow.CreateHuOption = ddlCreateHuOption.SelectedValue;
        }
        if (tbCarrier != null && tbCarrier.Text.Trim() != string.Empty)
        {
            flow.Carrier = TheCarrierMgr.LoadCarrier(tbCarrier.Text.Trim());
        }
        if (tbCarrierBillAddress != null && tbCarrierBillAddress.Text.Trim() != string.Empty)
        {
            flow.CarrierBillAddress = TheAddressMgr.LoadBillAddress(tbCarrierBillAddress.Text.Trim());
        }
        if (ddlGrGapTo != null && ddlGrGapTo.SelectedIndex != -1)
        {
            flow.GoodsReceiptGapTo = ddlGrGapTo.SelectedValue;
        }
        if (ddlCheckDetailOption != null && ddlCheckDetailOption.SelectedIndex != -1)
        {
            flow.CheckDetailOption = ddlCheckDetailOption.SelectedValue;
        }
        if (ddlOrderTemplate.SelectedIndex != -1)
        {
            flow.OrderTemplate = ddlOrderTemplate.SelectedValue;
        }
        if (ddlAsnTemplate.SelectedIndex != -1)
        {
            flow.AsnTemplate = ddlAsnTemplate.SelectedValue;
        }
        if (ddlReceiptTemplate.SelectedIndex != -1)
        {
            flow.ReceiptTemplate = ddlReceiptTemplate.SelectedValue;
        }
        if (ddlHuTemplate.SelectedIndex != -1)
        {
            flow.HuTemplate = ddlHuTemplate.SelectedValue;
        }

        flow.Type           = BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_CUSTOMERGOODS;
        flow.AntiResolveHu  = BusinessConstants.CODE_MASTER_ANTI_RESOLVE_HU_VALUE_NOT_RESOLVE;
        flow.CreateUser     = this.CurrentUser;
        flow.CreateDate     = DateTime.Now;
        flow.LastModifyUser = this.CurrentUser;
        flow.LastModifyDate = DateTime.Now;
        flow.Version        = 0;
    }
Exemple #26
0
    private void UpdateView(Flow flow)
    {
        Controls_TextBox tbRefFlow            = (Controls_TextBox)this.FV_Flow.FindControl("tbRefFlow");
        Controls_TextBox tbPartyFrom          = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyFrom");
        Controls_TextBox tbPartyTo            = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyTo");
        Controls_TextBox tbLocTo              = (Controls_TextBox)this.FV_Flow.FindControl("tbLocTo");
        Controls_TextBox tbShipFrom           = (Controls_TextBox)this.FV_Flow.FindControl("tbShipFrom");
        Controls_TextBox tbShipTo             = (Controls_TextBox)this.FV_Flow.FindControl("tbShipTo");
        Controls_TextBox tbBillFrom           = (Controls_TextBox)this.FV_Flow.FindControl("tbBillFrom");
        Controls_TextBox tbCarrier            = (Controls_TextBox)this.FV_Flow.FindControl("tbCarrier");
        Controls_TextBox tbCarrierBillAddress = (Controls_TextBox)this.FV_Flow.FindControl("tbCarrierBillAddress");

        com.Sconit.Control.CodeMstrDropDownList ddlGrGapTo = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlGrGapTo");
        Controls_TextBox tbPriceListFrom = (Controls_TextBox)this.FV_Flow.FindControl("tbPriceListFrom");
        Controls_TextBox tbCurrency      = (Controls_TextBox)this.FV_Flow.FindControl("tbCurrency");


        com.Sconit.Control.CodeMstrDropDownList ddlCheckDetailOption = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlCheckDetailOption"));
        com.Sconit.Control.CodeMstrDropDownList ddlOrderTemplate     = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlOrderTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlAsnTemplate       = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlAsnTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlReceiptTemplate   = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlReceiptTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlHuTemplate        = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlHuTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlBillSettleTerm    = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlBillSettleTerm");
        com.Sconit.Control.CodeMstrDropDownList ddlCreateHuOption    = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlCreateHuOption");

        tbPartyFrom.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_CUSTOMERGOODS + ",string:" + this.CurrentUser.Code;
        tbPartyFrom.DataBind();
        tbPartyTo.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_CUSTOMERGOODS + ",string:" + this.CurrentUser.Code;
        tbPartyTo.DataBind();

        tbRefFlow.ServiceParameter = "string:" + this.CurrentUser.Code;
        tbRefFlow.DataBind();

        if (flow.ReferenceFlow != null)
        {
            tbRefFlow.Text = flow.ReferenceFlow;
        }
        if (flow.PartyFrom != null)
        {
            tbPartyFrom.Text = flow.PartyFrom.Code;
        }
        if (flow.PartyTo != null)
        {
            tbPartyTo.Text = flow.PartyTo.Code;
        }
        if (flow.LocationTo != null)
        {
            tbLocTo.Text = flow.LocationTo.Code;
        }
        if (flow.ShipFrom != null)
        {
            tbShipFrom.Text = flow.ShipFrom.Code;
        }
        if (flow.ShipTo != null)
        {
            tbShipTo.Text = flow.ShipTo.Code;
        }
        if (flow.BillFrom != null)
        {
            tbBillFrom.Text = flow.BillFrom.Code;
        }

        if (flow.Carrier != null)
        {
            tbCarrier.Text = flow.Carrier.Code;
        }
        if (flow.CarrierBillAddress != null)
        {
            tbCarrierBillAddress.Text = flow.CarrierBillAddress.Code;
        }
        if (flow.GoodsReceiptGapTo != null)
        {
            ddlGrGapTo.SelectedValue = flow.GoodsReceiptGapTo;
        }
        if (flow.OrderTemplate != null)
        {
            ddlOrderTemplate.SelectedValue = flow.OrderTemplate;
        }
        if (flow.BillSettleTerm != null)
        {
            ddlBillSettleTerm.SelectedValue = flow.BillSettleTerm;
        }
        if (flow.AsnTemplate != null)
        {
            ddlAsnTemplate.SelectedValue = flow.AsnTemplate;
        }
        if (flow.ReceiptTemplate != null)
        {
            ddlReceiptTemplate.SelectedValue = flow.ReceiptTemplate;
        }
        if (flow.HuTemplate != null)
        {
            ddlHuTemplate.SelectedValue = flow.HuTemplate;
        }
        if (flow.CheckDetailOption != null)
        {
            ddlCheckDetailOption.SelectedValue = flow.CheckDetailOption;
        }
        if (flow.PriceListFrom != null)
        {
            tbPriceListFrom.Text = flow.PriceListFrom.Code;
        }
        if (flow.CreateHuOption != null)
        {
            ddlCreateHuOption.SelectedValue = flow.CreateHuOption;
        }
        if (flow.Currency != null)
        {
            tbCurrency.Text = flow.Currency.Code;
        }
    }
Exemple #27
0
    private void UpdateView(Flow flow)
    {
        Controls_TextBox tbRefFlow   = (Controls_TextBox)this.FV_Flow.FindControl("tbRefFlow");
        Controls_TextBox tbPartyFrom = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyFrom");
        Controls_TextBox tbPartyTo   = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyTo");
        Controls_TextBox tbLocFrom   = (Controls_TextBox)this.FV_Flow.FindControl("tbLocFrom");
        Controls_TextBox tbLocTo     = (Controls_TextBox)this.FV_Flow.FindControl("tbLocTo");

        com.Sconit.Control.CodeMstrDropDownList ddlCheckDetailOption = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlCheckDetailOption"));

        com.Sconit.Control.CodeMstrDropDownList ddlOrderTemplate   = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlOrderTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlAsnTemplate     = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlAsnTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlReceiptTemplate = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlReceiptTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlHuTemplate      = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlHuTemplate"));

        Controls_TextBox tbCurrency           = (Controls_TextBox)this.FV_Flow.FindControl("tbCurrency");
        Controls_TextBox tbTPriceList         = (Controls_TextBox)this.FV_Flow.FindControl("tbTPriceList");
        Controls_TextBox tbTRoute             = (Controls_TextBox)this.FV_Flow.FindControl("tbTRoute");
        Controls_TextBox tbCarrier            = (Controls_TextBox)this.FV_Flow.FindControl("tbCarrier");
        Controls_TextBox tbCarrierBillAddress = (Controls_TextBox)this.FV_Flow.FindControl("tbCarrierBillAddress");

        com.Sconit.Control.CodeMstrDropDownList ddlCreateHuOption = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlCreateHuOption");

        com.Sconit.Control.CodeMstrDropDownList ddlGrGapTo = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlGrGapTo");
        tbPartyFrom.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_TRANSFER + ",string:" + this.CurrentUser.Code;
        tbPartyFrom.DataBind();

        tbPartyTo.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_TRANSFER + ",string:" + this.CurrentUser.Code;
        tbPartyTo.DataBind();

        tbRefFlow.ServiceParameter = "string:" + this.CurrentUser.Code;
        tbRefFlow.DataBind();


        tbCarrier.ServiceParameter = "string:" + this.CurrentUser.Code;
        tbCarrier.DataBind();
        if (flow.ReferenceFlow != null && flow.ReferenceFlow.Trim() != string.Empty)
        {
            tbRefFlow.Text = flow.ReferenceFlow;
        }
        if (flow.PartyFrom != null)
        {
            tbPartyFrom.Text = flow.PartyFrom.Code;
        }
        if (flow.PartyTo != null)
        {
            tbPartyTo.Text = flow.PartyTo.Code;
        }

        if (flow.LocationFrom != null)
        {
            tbLocFrom.Text = flow.LocationFrom.Code;
        }
        if (flow.LocationTo != null)
        {
            tbLocTo.Text = flow.LocationTo.Code;
        }
        if (flow.OrderTemplate != null)
        {
            ddlOrderTemplate.SelectedValue = flow.OrderTemplate;
        }
        if (flow.GoodsReceiptGapTo != null)
        {
            ddlGrGapTo.SelectedValue = flow.GoodsReceiptGapTo;
        }
        if (flow.CheckDetailOption != null)
        {
            ddlCheckDetailOption.SelectedValue = flow.CheckDetailOption;
        }
        if (flow.AsnTemplate != null)
        {
            ddlAsnTemplate.SelectedValue = flow.AsnTemplate;
        }
        if (flow.ReceiptTemplate != null)
        {
            ddlReceiptTemplate.SelectedValue = flow.ReceiptTemplate;
        }
        if (flow.HuTemplate != null)
        {
            ddlHuTemplate.SelectedValue = flow.HuTemplate;
        }
        if (flow.CreateHuOption != null)
        {
            ddlCreateHuOption.SelectedValue = flow.CreateHuOption;
        }
        if (flow.Currency != null)
        {
            tbCurrency.Text = flow.Currency.Code;
        }
        if (flow.TransportationRoute != null)
        {
            tbTRoute.Text = flow.TransportationRoute.Code;
        }
        if (flow.TransportPriceList != null)
        {
            tbTPriceList.Text = flow.TransportPriceList.Code;
        }
        if (flow.Carrier != null)
        {
            tbCarrier.Text = flow.Carrier.Code;
        }
        if (flow.CarrierBillAddress != null)
        {
            tbCarrierBillAddress.Text = flow.CarrierBillAddress.Code;
        }
    }
Exemple #28
0
    private void UpdateView(Flow flow)
    {
        Controls_TextBox tbRefFlow   = (Controls_TextBox)this.FV_Flow.FindControl("tbRefFlow");
        Controls_TextBox tbPartyFrom = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyFrom");

        Controls_TextBox tbLocFrom = (Controls_TextBox)this.FV_Flow.FindControl("tbLocFrom");
        Controls_TextBox tbLocTo   = (Controls_TextBox)this.FV_Flow.FindControl("tbLocTo");

        com.Sconit.Control.CodeMstrDropDownList ddlOrderTemplate   = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlOrderTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlReceiptTemplate = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlReceiptTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlHuTemplate      = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlHuTemplate"));

        com.Sconit.Control.CodeMstrDropDownList ddlCreateHuOption = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlCreateHuOption");
        com.Sconit.Control.CodeMstrDropDownList ddlMrpOption      = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlMrpOption");

        tbPartyFrom.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_PRODUCTION + ",string:" + this.CurrentUser.Code;
        tbPartyFrom.DataBind();
        #region 生产类型flow不限制库位
        tbLocFrom.ServiceParameter = "string:" + this.CurrentUser.Code + ",string:";
        tbLocFrom.DataBind();
        tbLocTo.ServiceParameter = "string:" + this.CurrentUser.Code + ",string:";
        tbLocTo.DataBind();
        #endregion


        tbRefFlow.ServiceParameter = "string:" + this.CurrentUser.Code;
        tbRefFlow.DataBind();

        if (flow.ReferenceFlow != null && flow.ReferenceFlow.Trim() != string.Empty)
        {
            tbRefFlow.Text = flow.ReferenceFlow;
        }
        if (flow.PartyFrom != null)
        {
            tbPartyFrom.Text = flow.PartyFrom.Code;
        }

        if (flow.LocationFrom != null)
        {
            tbLocFrom.Text = flow.LocationFrom.Code;
        }
        if (flow.LocationTo != null)
        {
            tbLocTo.Text = flow.LocationTo.Code;
        }
        if (flow.OrderTemplate != null)
        {
            ddlOrderTemplate.SelectedValue = flow.OrderTemplate;
        }
        if (flow.ReceiptTemplate != null)
        {
            ddlReceiptTemplate.SelectedValue = flow.ReceiptTemplate;
        }
        if (flow.HuTemplate != null)
        {
            ddlHuTemplate.SelectedValue = flow.HuTemplate;
        }
        if (flow.CreateHuOption != null)
        {
            ddlCreateHuOption.SelectedValue = flow.CreateHuOption;
        }
        if (flow.MRPOption != null)
        {
            ddlMrpOption.SelectedValue = flow.MRPOption;
        }
    }
Exemple #29
0
    protected void ODS_Flow_Inserting(object sender, ObjectDataSourceMethodEventArgs e)
    {
        flow = (Flow)e.InputParameters[0];

        Controls_TextBox tbRefFlow   = (Controls_TextBox)this.FV_Flow.FindControl("tbRefFlow");
        Controls_TextBox tbPartyFrom = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyFrom");
        Controls_TextBox tbPartyTo   = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyTo");
        Controls_TextBox tbLocFrom   = (Controls_TextBox)this.FV_Flow.FindControl("tbLocFrom");
        Controls_TextBox tbLocTo     = (Controls_TextBox)this.FV_Flow.FindControl("tbLocTo");

        com.Sconit.Control.CodeMstrDropDownList ddlGrGapTo           = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlGrGapTo");
        com.Sconit.Control.CodeMstrDropDownList ddlCheckDetailOption = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlCheckDetailOption");
        com.Sconit.Control.CodeMstrDropDownList ddlOrderTemplate     = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlOrderTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlAsnTemplate       = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlAsnTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlReceiptTemplate   = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlReceiptTemplate"));
        com.Sconit.Control.CodeMstrDropDownList ddlHuTemplate        = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Flow.FindControl("ddlHuTemplate"));

        com.Sconit.Control.CodeMstrDropDownList ddlCreateHuOption = (com.Sconit.Control.CodeMstrDropDownList) this.FV_Flow.FindControl("ddlCreateHuOption");

        Controls_TextBox tbCarrier            = (Controls_TextBox)this.FV_Flow.FindControl("tbCarrier");
        Controls_TextBox tbCarrierBillAddress = (Controls_TextBox)this.FV_Flow.FindControl("tbCarrierBillAddress");
        Controls_TextBox tbCurrency           = (Controls_TextBox)this.FV_Flow.FindControl("tbCurrency");
        Controls_TextBox tbPriceListTo        = (Controls_TextBox)this.FV_Flow.FindControl("tbPriceListTo");
        Controls_TextBox tbTPriceList         = (Controls_TextBox)this.FV_Flow.FindControl("tbTPriceList");
        Controls_TextBox tbTRoute             = (Controls_TextBox)this.FV_Flow.FindControl("tbTRoute");

        if (tbRefFlow != null && tbRefFlow.Text.Trim() != string.Empty)
        {
            flow.ReferenceFlow = TheFlowMgr.CheckAndLoadFlow(tbRefFlow.Text.Trim()).Code;
        }

        if (tbPartyFrom != null && tbPartyFrom.Text.Trim() != string.Empty)
        {
            flow.PartyFrom = ThePartyMgr.LoadParty(tbPartyFrom.Text.Trim());
        }

        if (tbPartyTo != null && tbPartyTo.Text.Trim() != string.Empty)
        {
            flow.PartyTo = ThePartyMgr.LoadParty(tbPartyTo.Text.Trim());
        }

        if (tbLocFrom != null && tbLocFrom.Text.Trim() != string.Empty)
        {
            flow.LocationFrom = TheLocationMgr.LoadLocation(tbLocFrom.Text.Trim());
        }
        if (tbLocTo != null && tbLocTo.Text.Trim() != string.Empty)
        {
            flow.LocationTo = TheLocationMgr.LoadLocation(tbLocTo.Text.Trim());
        }
        if (ddlOrderTemplate.SelectedIndex != -1)
        {
            flow.OrderTemplate = ddlOrderTemplate.SelectedValue;
        }
        if (ddlGrGapTo != null && ddlGrGapTo.SelectedIndex != -1)
        {
            flow.GoodsReceiptGapTo = ddlGrGapTo.SelectedValue;
        }
        if (ddlCheckDetailOption != null && ddlCheckDetailOption.SelectedIndex != -1)
        {
            flow.CheckDetailOption = ddlCheckDetailOption.SelectedValue;
        }
        if (ddlAsnTemplate.SelectedIndex != -1)
        {
            flow.AsnTemplate = ddlAsnTemplate.SelectedValue;
        }
        if (ddlReceiptTemplate.SelectedIndex != -1)
        {
            flow.ReceiptTemplate = ddlReceiptTemplate.SelectedValue;
        }
        if (ddlHuTemplate.SelectedIndex != -1)
        {
            flow.HuTemplate = ddlHuTemplate.SelectedValue;
        }
        if (ddlCreateHuOption.SelectedIndex != -1)
        {
            flow.CreateHuOption = ddlCreateHuOption.SelectedValue;
        }
        if (tbCarrier != null && tbCarrier.Text.Trim() != string.Empty)
        {
            flow.Carrier = TheCarrierMgr.LoadCarrier(tbCarrier.Text.Trim());
        }
        if (tbCarrierBillAddress != null && tbCarrierBillAddress.Text.Trim() != string.Empty)
        {
            flow.CarrierBillAddress = TheAddressMgr.LoadBillAddress(tbCarrierBillAddress.Text.Trim());
        }
        if (tbTPriceList != null && tbTPriceList.Text.Trim() != string.Empty)
        {
            flow.TransportPriceList = TheTransportPriceListMgr.LoadTransportPriceList(tbTPriceList.Text.Trim());
        }
        if (tbTRoute != null && tbTRoute.Text.Trim() != string.Empty)
        {
            flow.TransportationRoute = TheTransportationRouteMgr.LoadTransportationRoute(tbTRoute.Text.Trim());
        }

        if (tbCurrency != null && tbCurrency.Text.Trim() != string.Empty)
        {
            flow.Currency = TheCurrencyMgr.LoadCurrency(tbCurrency.Text.Trim());
        }
        else
        {
            string currencyCode = TheEntityPreferenceMgr.LoadEntityPreference(BusinessConstants.ENTITY_PREFERENCE_CODE_BASE_CURRENCY).Value;
            flow.Currency = TheCurrencyMgr.LoadCurrency(currencyCode);
        }
        flow.BillSettleTerm    = null;
        flow.CheckDetailOption = BusinessConstants.CODE_MASTER_CHECK_ORDER_DETAIL_OPTION_VALUE_NOT_CHECK;
        flow.Type           = BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_TRANSFER;
        flow.AntiResolveHu  = BusinessConstants.CODE_MASTER_ANTI_RESOLVE_HU_VALUE_NOT_RESOLVE;
        flow.CreateUser     = this.CurrentUser;
        flow.CreateDate     = DateTime.Now;
        flow.LastModifyUser = this.CurrentUser;
        flow.LastModifyDate = DateTime.Now;
        flow.Version        = 0;
    }
Exemple #30
0
    protected void FV_Order_DataBound(object sender, EventArgs e)
    {
        TransportationOrder order = (TransportationOrder)((FormView)sender).DataItem;

        ((Label)(this.FV_Order.FindControl("tbShipFrom"))).Text = order.TransportationRoute != null ? order.TransportationRoute.ShipFrom.FullAddress : string.Empty;
        ((Label)(this.FV_Order.FindControl("tbShipTo"))).Text   = order.TransportationRoute != null ? order.TransportationRoute.ShipTo.FullAddress : string.Empty;

        Controls_TextBox tbCarrier            = (Controls_TextBox)(this.FV_Order.FindControl("tbCarrier"));
        Controls_TextBox tbCarrierBillAddress = (Controls_TextBox)(this.FV_Order.FindControl("tbCarrierBillAddress"));

        tbCarrier.ServiceParameter = "string:" + this.CurrentUser.Code;
        tbCarrier.DataBind();
        if (order.Carrier != null)
        {
            tbCarrier.Text = order.Carrier.Code;
        }
        if (order.CarrierBillAddress != null)
        {
            tbCarrierBillAddress.Text = order.CarrierBillAddress.Code;
        }

        Controls_TextBox tbVehicle = (Controls_TextBox)(this.FV_Order.FindControl("tbVehicle"));

        if (order.Vehicle != null)
        {
            tbVehicle.Text = order.Vehicle;
        }

        Controls_TextBox tbExpense = (Controls_TextBox)(this.FV_Order.FindControl("tbExpense"));

        if (order.Expense != null)
        {
            tbExpense.Text = order.Expense.Code;
        }



        com.Sconit.Control.CodeMstrDropDownList ddlPricingMethod = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Order.FindControl("ddlPricingMethod"));
        if (order.PricingMethod != null)
        {
            ddlPricingMethod.SelectedValue = order.PricingMethod;
            ddlPricingMethod_SelectedIndexChanged(null, null);
        }
        else
        {
            ddlPricingMethod.SelectedIndex = 0;
        }
        //add by ljz start
        com.Sconit.Control.CodeMstrDropDownList ddlTransportMethod = (com.Sconit.Control.CodeMstrDropDownList)(this.FV_Order.FindControl("ddlTransportMethod"));
        if (order.TransportMethod != null)
        {
            ddlTransportMethod.SelectedValue = order.TransportMethod;
            //ddlTransportMethod_SelectedIndexChanged(null, null);
        }
        else
        {
            ddlPricingMethod.SelectedIndex = 0;
        }
        //add by ljz end
        DropDownList ddlType = (DropDownList)(this.FV_Order.FindControl("ddlType"));

        if (order.VehicleType != null)
        {
            ddlType.SelectedValue = order.VehicleType;
        }

        UpdateView();
        UpdateViewButton();
    }