DataBind() public method

public DataBind ( ) : void
return void
Example #1
0
    protected void FV_Routing_DataBound(object sender, EventArgs e)
    {
        if (FlowCode != null && FlowCode != string.Empty)
        {
            Flow flow = TheFlowMgr.LoadFlow(FlowCode);

            Controls_TextBox tbRouting    = (Controls_TextBox)(this.FV_Routing.FindControl("tbRouting"));
            Literal          lblRouting   = (Literal)this.FV_Routing.FindControl("lblRouting");
            Literal          lDescription = (Literal)(this.FV_Routing.FindControl("lDescription"));
            lblRouting.Text = FlowHelper.GetFlowRoutingLabel(this.ModuleType) + ":";
            if (this.ModuleType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_PRODUCTION)
            {
                if (this.IsReturn)
                {
                    tbRouting.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_ROUTING_TYPE_VALUE_REWORK;
                }
                else
                {
                    tbRouting.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_ROUTING_TYPE_VALUE_PRODUCTION;
                }
                tbRouting.DataBind();
            }
            else
            {
                tbRouting.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_ROUTING_TYPE_VALUE_BINARY;
                tbRouting.DataBind();
            }
            if (!IsReturn)
            {
                if (flow.Routing != null)
                {
                    tbRouting.Text    = flow.Routing.Code;
                    lDescription.Text = flow.Routing.Description;
                    EditEvent(DoSearch(flow.Routing.Code, IsReturn), null);
                }
            }
            else
            {
                if (flow.ReturnRouting != null)
                {
                    lblRouting.Text   = "${MasterData.Flow.ReturnRouting}";
                    tbRouting.Text    = flow.ReturnRouting.Code;
                    lDescription.Text = flow.ReturnRouting.Description;
                    EditEvent(DoSearch(flow.ReturnRouting.Code, IsReturn), null);
                }
            }
        }
    }
Example #2
0
    protected void GV_List_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            StorageBin storageBin = (StorageBin)e.Row.DataItem;
            Label      lblBinCode = (Label)(e.Row.FindControl("lblBinCode"));

            Controls_TextBox tbBinCodeFrom = (Controls_TextBox)(e.Row.FindControl("tbBinCodeFrom"));
            Label            lbTo          = (Label)(e.Row.FindControl("lbTo"));
            Controls_TextBox tbBinCodeTo   = (Controls_TextBox)(e.Row.FindControl("tbBinCodeTo"));

            if (storageBin.IsBlank)
            {
                lblBinCode.Visible             = false;
                tbBinCodeFrom.Visible          = true;
                tbBinCodeFrom.ServiceParameter = "string:" + this.Location;
                tbBinCodeFrom.DataBind();
                lbTo.Visible                 = true;
                tbBinCodeTo.Visible          = true;
                tbBinCodeTo.ServiceParameter = "string:" + this.Location;
                tbBinCodeTo.DataBind();
            }
            e.Row.FindControl("lbtnAdd").Visible    = storageBin.IsBlank;
            e.Row.FindControl("lbtnDelete").Visible = !storageBin.IsBlank;
        }
    }
Example #3
0
    public void PageCleanup()
    {
        ((TextBox)(this.FV_WorkCenter.FindControl("tbCode"))).Text = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbName"))).Text = string.Empty;

        ((TextBox)(this.FV_WorkCenter.FindControl("tbLaborBurdenPercent"))).Text     = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbLaborBurdenRate"))).Text        = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbSetupBurdenPercent"))).Text     = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbSetupBurdenRate"))).Text        = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbLaborRate"))).Text              = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbMachine"))).Text                = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbMachineQty"))).Text             = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbMachineBurdenRate"))).Text      = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbMachineSetupBurdenRate"))).Text = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbRunCrew"))).Text                = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbSetupCrew"))).Text              = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbSetupRate"))).Text              = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbQueueTime"))).Text              = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbWaitTime"))).Text               = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbPercentEfficiency"))).Text      = string.Empty;
        ((TextBox)(this.FV_WorkCenter.FindControl("tbPercentUtilization"))).Text     = string.Empty;
        ((CheckBox)(this.FV_WorkCenter.FindControl("tbIsActive"))).Checked           = false;
        ((Literal)(this.FV_WorkCenter.FindControl("lbCurrentParty"))).Text           = this.ParentCode;
        Controls_TextBox tbType = (Controls_TextBox)(this.FV_WorkCenter.FindControl("tbType"));

        tbType.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_WORKCENTER_TYPE;
        tbType.DataBind();
    }
Example #4
0
    protected void GV_List_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            InspectItem inspectItem = (InspectItem)e.Row.DataItem;

            if (inspectItem.IsBlank)
            {
                e.Row.FindControl("lblItemCode").Visible = false;
                Controls_TextBox tbItemCode = (Controls_TextBox)e.Row.FindControl("tbItemCode");
                tbItemCode.Visible          = true;
                tbItemCode.ServiceParameter = "string:" + tbFlow.Text.Trim();
                tbItemCode.DataBind();
                e.Row.FindControl("lbtnAdd").Visible = true;
            }
            else
            {
                e.Row.FindControl("lblItemCode").Visible = true;
                e.Row.FindControl("tbItemCode").Visible  = false;
                com.Sconit.Control.CodeMstrDropDownList tbDefectClassification = (com.Sconit.Control.CodeMstrDropDownList)e.Row.FindControl("tbDefectClassification");
                tbDefectClassification.SelectedValue = inspectItem.DefectClassification;
                com.Sconit.Control.CodeMstrDropDownList tbDefectFactor = (com.Sconit.Control.CodeMstrDropDownList)e.Row.FindControl("tbDefectFactor");
                tbDefectFactor.SelectedValue = inspectItem.DefectFactor;
            }
        }
    }
Example #5
0
    private void UpdateView(Shelf shelf)
    {
        Controls_TextBox tbProductLine = (Controls_TextBox)this.FV_Shelf.FindControl("tbProductLine");

        tbProductLine.ServiceParameter = "string:" + this.CurrentUser.Code + ",bool:true";
        tbProductLine.DataBind();
        tbProductLine.Text = shelf.ProductLine.Code;
    }
Example #6
0
    protected void FV_Routing_DataBound(object sender, EventArgs e)
    {
        Controls_TextBox tbRegion = ((Controls_TextBox)(this.FV_Routing.FindControl("tbRegion")));

        tbRegion.ServiceParameter = "string:" + this.CurrentUser.Code;
        tbRegion.DataBind();
        this.UpdateView();
    }
Example #7
0
    protected void FV_WorkCenter_DataBound(object sender, EventArgs e)
    {
        WorkCenter wc = TheWorkCenterMgr.LoadWorkCenter(this.WorkCenterCode);

        ((Literal)(this.FV_WorkCenter.FindControl("lbCurrentParty"))).Text = wc.Party.Code;
        Controls_TextBox tbType = (Controls_TextBox)(this.FV_WorkCenter.FindControl("tbType"));

        tbType.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_WORKCENTER_TYPE;
        tbType.DataBind();
        tbType.Text = wc.Type;
    }
Example #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        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");

        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();
    }
Example #9
0
    public void PageCleanup()
    {
        ((TextBox)(this.FV_Shelf.FindControl("tbCode"))).Text = string.Empty;
        ((Controls_TextBox)(this.FV_Shelf.FindControl("tbProductLine"))).Text = string.Empty;
        ((TextBox)(this.FV_Shelf.FindControl("tbTagNo"))).Text        = string.Empty;
        ((TextBox)(this.FV_Shelf.FindControl("tbCapacity"))).Text     = string.Empty;
        ((CheckBox)(this.FV_Shelf.FindControl("cbIsActive"))).Checked = true;

        Controls_TextBox tbProductLine = (Controls_TextBox)this.FV_Shelf.FindControl("tbProductLine");

        tbProductLine.ServiceParameter = "string:" + this.CurrentUser.Code + ",bool:true";
        tbProductLine.DataBind();
    }
Example #10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            BillSettleTermDataBind();
        }
        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");

        tbPartyFrom.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_PROCUREMENT + ",string:" + this.CurrentUser.Code;
        tbPartyFrom.DataBind();
        tbPartyTo.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_PROCUREMENT + ",string:" + this.CurrentUser.Code;
        tbPartyTo.DataBind();
        tbRefFlow.ServiceParameter = "string:" + this.CurrentUser.Code;
        tbRefFlow.DataBind();
    }
Example #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        Controls_TextBox tbRefFlow   = (Controls_TextBox)this.FV_Flow.FindControl("tbRefFlow");
        Controls_TextBox tbPartyFrom = (Controls_TextBox)this.FV_Flow.FindControl("tbPartyFrom");

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

        #region 生产类型flow不限制库位
        Controls_TextBox tbLocFrom = (Controls_TextBox)this.FV_Flow.FindControl("tbLocFrom");
        Controls_TextBox tbLocTo   = (Controls_TextBox)this.FV_Flow.FindControl("tbLocTo");
        tbLocFrom.ServiceParameter = "string:" + this.CurrentUser.Code + ",string:";
        tbLocFrom.DataBind();
        tbLocTo.ServiceParameter = "string:" + this.CurrentUser.Code + ",string:";
        tbLocTo.DataBind();
        #endregion
    }
Example #12
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;
    }
Example #13
0
    public void PageCleanup()
    {
        Flow             flow = TheFlowMgr.LoadFlow(this.FlowCode);
        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");


        lblMasterFlowTypeValue.Text = flow.Type;

        lblMasterFlowValue.Text    = flow.Code;
        lblMasterFlowValue.ToolTip = flow.Description;


        // tbSlaveFlow.ServiceMethod = FlowHelper.GetFlowServiceMethod(this.ModuleType);
        tbSlaveFlow.ServiceParameter = "string:" + this.CurrentUser.Code;
        tbSlaveFlow.DataBind();

        tbSlaveFlow.Text = string.Empty;
    }
Example #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;
            }
        }
    }
Example #15
0
    protected void Page_Load(object sender, EventArgs e)
    {
        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");

        tbPartyFrom.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_DISTRIBUTION + ",string:" + this.CurrentUser.Code;
        tbPartyFrom.DataBind();
        tbPartyTo.ServiceParameter = "string:" + BusinessConstants.CODE_MASTER_FLOW_TYPE_VALUE_DISTRIBUTION + ",string:" + this.CurrentUser.Code;
        tbPartyTo.DataBind();
        tbRefFlow.ServiceParameter = "string:" + this.CurrentUser.Code;
        tbRefFlow.DataBind();
        Controls_TextBox tbCarrier = (Controls_TextBox)(this.FV_Flow.FindControl("tbCarrier"));

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

        tbShipFlow.ServiceParameter = "string:" + this.CurrentUser.Code + ",bool:false,bool:false,bool:true,bool:false,bool:false,bool:false,string:" + BusinessConstants.PARTY_AUTHRIZE_OPTION_BOTH;
        if (!IsPostBack)
        {
            BillSettleTermDataBind();
        }
    }
Example #16
0
    protected void GV_List_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        Label   lblReferenceItemCode = ((Label)e.Row.FindControl("lblReferenceItemCode"));
        TextBox tbOrderQty           = (TextBox)e.Row.FindControl("tbOrderQty");

        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            FlowDetail flowDetail = (FlowDetail)e.Row.DataItem;
            Flow       flow       = flowDetail.Flow;

            #region 处理新增行
            if (flowDetail.IsBlankDetail)
            {
                ((Label)e.Row.FindControl("lblSeq")).Visible  = false;
                ((TextBox)e.Row.FindControl("tbSeq")).Visible = true;

                ((Label)e.Row.FindControl("lblItemDescription")).Visible  = false;
                ((TextBox)e.Row.FindControl("tbItemDescription")).Visible = true;

                ((TextBox)e.Row.FindControl("lblItemCode")).Visible = false;

                Controls_TextBox tbItemCode = (Controls_TextBox)e.Row.FindControl("tbItemCode");
                tbItemCode.Visible = true;
                tbItemCode.SuggestTextBox.Attributes.Add("onchange", "GenerateFlowDetail(this);");

                ((Controls_TextBox)e.Row.FindControl("tbItemCode")).Visible = true;
                ((Label)e.Row.FindControl("lblReferenceItemCode")).Visible  = false;

                ((Label)e.Row.FindControl("lblUom")).Visible = false;
                Controls_TextBox tbUom = (Controls_TextBox)e.Row.FindControl("tbUom");
                tbUom.Visible = true;
                tbUom.SuggestTextBox.Attributes.Add("onchange", "GetUnitPriceByUom(this);");

                ((Label)e.Row.FindControl("lblUnitCount")).Visible  = false;
                ((TextBox)e.Row.FindControl("tbUnitCount")).Visible = true;

                ((Label)e.Row.FindControl("lblPackageType")).Visible = false;
                ((com.Sconit.Control.CodeMstrDropDownList)e.Row.FindControl("ddlPackageType")).Visible = true;

                Controls_TextBox tbRefItemCode = (Controls_TextBox)e.Row.FindControl("tbRefItemCode");
                tbRefItemCode.Visible = true;

                tbRefItemCode.ServiceParameter = "string:" + this.PartyFromCode + ",string:" + this.PartyToCode;

                tbRefItemCode.DataBind();
                tbRefItemCode.SuggestTextBox.Attributes.Add("onchange", "GenerateFlowDetailProxyByReferenceItem(this);");

                ((RequiredFieldValidator)e.Row.FindControl("rfvItemCode")).Enabled = true;
                ((RequiredFieldValidator)e.Row.FindControl("rfvUom")).Enabled      = true;
                ((RequiredFieldValidator)e.Row.FindControl("rfvUC")).Enabled       = true;
                ((RangeValidator)e.Row.FindControl("rvUC")).Enabled = true;

                ((LinkButton)e.Row.FindControl("lbtnAdd")).Visible    = true;
                ((LinkButton)e.Row.FindControl("lbtnDelete")).Visible = false;
            }
            else
            {
                ((LinkButton)e.Row.FindControl("lbtnAdd")).Visible    = false;
                ((LinkButton)e.Row.FindControl("lbtnDelete")).Visible = true;
            }
            #endregion
        }
    }
    protected void GV_List_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (this.ModuleType == BusinessConstants.CODE_MASTER_ORDER_TYPE_VALUE_PRODUCTION)
        {
            if (e.Row.RowType == DataControlRowType.Header)
            {
                // ((DataControlFieldCell)(e.Row.Cells[8])).ContainingField.HeaderText = "${MasterData.Order.LocTrans.AccumulateRejectQty.Production}";
                // ((DataControlFieldCell)(e.Row.Cells[11])).ContainingField.HeaderText = "${MasterData.Order.LocTrans.ScrapLocation}";
            }
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                OrderLocationTransaction ordeLocTrans = (OrderLocationTransaction)e.Row.DataItem;

                if (this.OrderStatus == BusinessConstants.CODE_MASTER_STATUS_VALUE_CREATE)
                {
                    if (ordeLocTrans.IOType == BusinessConstants.IO_TYPE_IN)
                    {
                        this.GV_List.Columns[1].Visible  = false; //成品
                        this.GV_List.Columns[5].Visible  = false; //选装
                        this.GV_List.Columns[10].Visible = true;  //废品数
                        this.GV_List.Columns[11].Visible = true;  //次品数
                        this.GV_List.Columns[13].Visible = true;  //次品库位

                        if (this.IsScrap)
                        {
                            this.GV_List.Columns[10].Visible = false;
                            this.GV_List.Columns[11].Visible = false;
                            this.GV_List.Columns[12].Visible = false;
                            this.GV_List.Columns[13].Visible = false;
                            this.GV_List.Columns[14].Visible = false;
                            this.GV_List.Columns[15].Visible = false;
                        }
                    }
                    if (ordeLocTrans.IOType == BusinessConstants.IO_TYPE_OUT)
                    {
                        this.GV_List.Columns[5].Visible  = true; //选装
                        this.GV_List.Columns[15].Visible = true; //操作按钮

                        ((RequiredFieldValidator)e.Row.FindControl("rfvUnitQty")).Enabled   = true;
                        ((RequiredFieldValidator)e.Row.FindControl("rfvOrderdQty")).Enabled = true;
                        ((RangeValidator)e.Row.FindControl("rvUnitQty")).Enabled            = true;
                        ((RangeValidator)e.Row.FindControl("rvOrderdQty")).Enabled          = true;

                        ((CheckBox)e.Row.FindControl("cbNeedPrint")).Enabled = true;

                        e.Row.FindControl("lbOrderdQty").Visible = false;
                        TextBox tbOrderdQty = (TextBox)e.Row.FindControl("tbOrderdQty");
                        tbOrderdQty.Visible = true;
                        Label lbUnitQty = (Label)e.Row.FindControl("lbUnitQty");
                        lbUnitQty.Visible = false;
                        e.Row.FindControl("lbUnitQty").Visible = false;
                        e.Row.FindControl("tbUnitQty").Visible = true;

                        e.Row.FindControl("lbItemVersion").Visible = false;
                        e.Row.FindControl("tbItemVersion").Visible = true;

                        Label lbLocation = (Label)e.Row.FindControl("lbLocation");
                        lbLocation.Visible = false;
                        Controls_TextBox tbLocation = (Controls_TextBox)e.Row.FindControl("tbLocation");
                        tbLocation.Visible          = true;
                        tbLocation.ServiceParameter = "string:" + this.PartyFromCode;
                        tbLocation.DataBind();
                        tbLocation.Text = ordeLocTrans.Location == null ? string.Empty : ordeLocTrans.Location.Code;

                        TextBox tbUnitQty = (TextBox)e.Row.FindControl("tbUnitQty");
                        tbUnitQty.Attributes.Add("onchange", "UnitQtyChanged(this);");

                        if (!ordeLocTrans.IsBlank)
                        {
                            #region exist row
                            if (ordeLocTrans.BomDetail != null && ordeLocTrans.BomDetail.StructureType == BusinessConstants.CODE_MASTER_BOM_DETAIL_TYPE_VALUE_O)
                            {
                                e.Row.FindControl("cbIsAssemble").Visible = true;    //选装件
                            }
                            if (ordeLocTrans.Item.Type == BusinessConstants.CODE_MASTER_ITEM_TYPE_VALUE_A)
                            {
                                e.Row.FindControl("lbItem").Visible   = false;
                                e.Row.FindControl("lbtnEdit").Visible = true;
                            }
                            if (this.IsScrap)
                            {
                                tbLocation.Visible = false;
                                lbLocation.Visible = true;
                                if (this.IsReuse)
                                {
                                    if (ordeLocTrans.Item.Code == ordeLocTrans.OrderDetail.Item.Code)
                                    {
                                        tbOrderdQty.Text     = ordeLocTrans.OrderedQty.ToString("0.########");
                                        tbOrderdQty.ReadOnly = true;

                                        tbLocation.ServiceParameter = "string:" + this.PartyFromCode + ",bool:false,bool:true";
                                        tbLocation.DataBind();

                                        tbLocation.Visible = true;
                                        lbLocation.Visible = false;
                                    }
                                    else
                                    {
                                        tbOrderdQty.Text = (0 - ordeLocTrans.OrderedQty).ToString("0.########");
                                        RangeValidator rvOrderQty = (RangeValidator)e.Row.FindControl("rvOrderdQty");
                                        rvOrderQty.MaximumValue = "0";
                                        rvOrderQty.MinimumValue = "-999999999";
                                    }
                                }
                                else
                                {
                                    //  tbOrderdQty.Text = "0";
                                }
                                lbUnitQty.Visible = true;
                                tbUnitQty.Visible = false;

                                this.GV_List.Columns[5].Visible  = false;
                                this.GV_List.Columns[9].Visible  = false;
                                this.GV_List.Columns[10].Visible = false;
                                this.GV_List.Columns[11].Visible = false;
                                this.GV_List.Columns[12].Visible = true;
                                this.GV_List.Columns[13].Visible = false;
                                this.GV_List.Columns[14].Visible = false;
                                this.GV_List.Columns[15].Visible = false;
                            }
                            #endregion
                        }
                        else
                        {
                            #region newrow
                            e.Row.FindControl("lbOperation").Visible = false;
                            e.Row.FindControl("lbKitItem").Visible   = false;
                            e.Row.FindControl("lbItem").Visible      = false;

                            e.Row.FindControl("tbOperation").Visible = true;
                            DropDownList tbKitItem = (DropDownList)e.Row.FindControl("tbKitItem");
                            tbKitItem.Visible = true;

                            tbKitItem.DataSource = KitItemDic.ToList();
                            tbKitItem.DataBind();


                            Controls_TextBox tbItem = (Controls_TextBox)e.Row.FindControl("tbItem");
                            tbItem.Visible = true;
                            tbItem.SuggestTextBox.Attributes.Add("onchange", "GetItemUom(this);");



                            ((RangeValidator)e.Row.FindControl("rvOperation")).Enabled          = true;
                            ((RequiredFieldValidator)e.Row.FindControl("rfvOperation")).Enabled = true;
                            ((RequiredFieldValidator)e.Row.FindControl("rfvItem")).Enabled      = true;
                            ((RequiredFieldValidator)e.Row.FindControl("rfvLocation")).Enabled  = !(IsScrap && !IsReuse);
                            ((Controls_TextBox)e.Row.FindControl("tbLocation")).Visible         = !(IsScrap && !IsReuse);
                            ((Label)e.Row.FindControl("lbLocation")).Visible = IsScrap && !IsReuse;
                            if (IsScrap && !IsReuse)
                            {
                                ((TextBox)e.Row.FindControl("tbOperation")).Text = "10";
                                ((TextBox)e.Row.FindControl("tbUnitQty")).Text   = "1";
                            }
                            e.Row.FindControl("lbtnAdd").Visible    = true;
                            e.Row.FindControl("lbtnDelete").Visible = false;

                            #endregion
                        }
                    }
                }
                else
                {
                    this.GV_List.Columns[5].Visible = false; //选装
                    if (ordeLocTrans.IOType == BusinessConstants.IO_TYPE_IN)
                    {
                        this.GV_List.Columns[1].Visible = false; //成品
                    }
                }
            }
        }
        else
        {
            this.GV_List.Columns[1].Visible = false; //成品
        }
    }
Example #18
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;
        }
    }
Example #19
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;
        }
    }
Example #20
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;
        }
    }
Example #21
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();
    }
Example #22
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;
        }
    }
Example #23
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;
        }
    }