Exemplo n.º 1
0
    protected void CheckSlaveFlow(object source, ServerValidateEventArgs args)
    {
        String          masterFlowCode   = ((Label)this.FV_FlowBinding.FindControl("lblMasterFlowValue")).Text;
        String          slaveFlowCode    = ((Controls_TextBox)this.FV_FlowBinding.FindControl("tbSlaveFlow")).Text;
        CustomValidator cvSlaveFlowCheck = ((CustomValidator)this.FV_FlowBinding.FindControl("cvSlaveFlowCheck"));

        if (TheFlowBindingMgr.LoadFlowBinding(masterFlowCode, slaveFlowCode) != null)
        {
            args.IsValid = false;
            ShowErrorMessage("MasterData.Flow.Binding.SlaveFlow.Exists");
        }
        if (CheckLoopBind(masterFlowCode, slaveFlowCode))
        {
            args.IsValid = false;
            ShowErrorMessage("MasterData.Flow.Binding.SlaveFlow.LoopBind");
        }
    }
Exemplo n.º 2
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;
    }
Exemplo n.º 3
0
    protected void ODS_FlowBinding_Updating(object sender, ObjectDataSourceMethodEventArgs e)
    {
        FlowBinding flowBinding    = (FlowBinding)e.InputParameters[0];
        FlowBinding oldFlowBinding = TheFlowBindingMgr.LoadFlowBinding(FlowBindingId);

        flowBinding.MasterFlow = oldFlowBinding.MasterFlow;

        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;
        }
    }