protected void bt_Save_Click(object sender, EventArgs e)
    {
        ListTable <EWF_Flow_DataObject> lt = (ListTable <EWF_Flow_DataObject>)ViewState["ListTable"];

        EWF_Flow_DataObjectBLL bll = new EWF_Flow_DataObjectBLL();

        foreach (EWF_Flow_DataObject item in lt.GetListItem(ItemState.Added))
        {
            bll.Model = item;
            bll.Add();
        }

        foreach (EWF_Flow_DataObject item in lt.GetListItem(ItemState.Modified))
        {
            bll.Model = item;
            bll.Update();
        }

        foreach (EWF_Flow_DataObject item in lt.GetListItem(ItemState.Deleted))
        {
            bll.Delete(item.ID);
        }

        Response.Redirect("FlowDataObjectList.aspx?AppID=" + ViewState["AppID"].ToString());
    }
Exemplo n.º 2
0
    //绑定条件判断环节详细信息
    private void BindConditionProcessInfo(int JobID)
    {
        EWF_Task_JobBLL job  = new EWF_Task_JobBLL(JobID);
        EWF_TaskBLL     task = new EWF_TaskBLL(job.Model.Task);
        EWF_Flow_ProcessConditionBLL process    = new EWF_Flow_ProcessConditionBLL(job.Model.CurrentProcess);
        EWF_Flow_DataObjectBLL       dataobject = new EWF_Flow_DataObjectBLL(process.Model.DataObject);

        this.lbl_DataObjectName.Text        = dataobject.Model.Name;
        this.lbl_DataObjectDisPlayName.Text = dataobject.Model.DisplayName;

        this.lbl_DataObjectValue.Text  = task.GetDataObjectValue()[dataobject.Model.Name];;
        this.lbl_OperatorTypeName.Text = DictionaryBLL.GetDicCollections("EWF_Flow_OperatorType")[process.Model.OperatorType.ToString()].Name;

        this.lbl_Value1.Text = process.Model.Value1;
        this.lbl_Value2.Text = process.Model.Value2;
    }
    protected void bt_Save_Click(object sender, EventArgs e)
    {
        ListTable<EWF_Flow_DataObject> lt = (ListTable<EWF_Flow_DataObject>)ViewState["ListTable"];

        EWF_Flow_DataObjectBLL bll = new EWF_Flow_DataObjectBLL();
        foreach (EWF_Flow_DataObject item in lt.GetListItem(ItemState.Added))
        {
            bll.Model = item;
            bll.Add();
        }

        foreach (EWF_Flow_DataObject item in lt.GetListItem(ItemState.Modified))
        {
            bll.Model = item;
            bll.Update();
        }

        foreach (EWF_Flow_DataObject item in lt.GetListItem(ItemState.Deleted))
        {
            bll.Delete(item.ID);
        }

        Response.Redirect("FlowDataObjectList.aspx?AppID=" + ViewState["AppID"].ToString());
    }
Exemplo n.º 4
0
        /// <summary>
        /// Bind data to the control by special NameValueCollection
        /// </summary>
        public void BindData(NameValueCollection dataobjects)
        {
            foreach (object key in HTDataObjectControlInfo.Keys)
            {
                DataObjectControlInfo _dataobjectcontrolinfo = (DataObjectControlInfo)HTDataObjectControlInfo[key];
                EWF_Flow_DataObject _dataobjct = new EWF_Flow_DataObjectBLL(_dataobjectcontrolinfo.DataObjectID).Model;

                try
                {
                    switch (_dataobjectcontrolinfo.ControlType)
                    {
                        case 1: //Label控件
                            if (_dataobjct.RelationType == 3)
                                ((Label)this.FindControl(_dataobjectcontrolinfo.ControlName)).Text = dataobjects[key.ToString()];
                            else
                            {
                                if (_dataobjct.RelationType == 2 && new UD_TableListBLL(_dataobjct.RelationTableName).Model.TreeFlag == "Y")
                                {
                                    //关联到实体树形结构表时,显示全路径
                                    int value = 0;
                                    if (int.TryParse(dataobjects[key.ToString()], out value))
                                        ((Label)this.FindControl(_dataobjectcontrolinfo.ControlName)).Text = TreeTableBLL.GetFullPathName(_dataobjct.RelationTableName, value);
                                }
                                else
                                    ((Label)this.FindControl(_dataobjectcontrolinfo.ControlName)).Text = GetRelateTextByValue(_dataobjct, dataobjects[key.ToString()]);
                            }
                            break;
                        case 2:
                        case 5:
                            if (_dataobjct.RelationType == 3)
                                ((TextBox)this.FindControl(_dataobjectcontrolinfo.ControlName)).Text = dataobjects[key.ToString()];
                            else
                                ((TextBox)this.FindControl(_dataobjectcontrolinfo.ControlName)).Text = GetRelateTextByValue(_dataobjct, dataobjects[key.ToString()]);
                            break;
                        case 3:
                            if (dataobjects[key.ToString()] != "")
                                ((DropDownList)this.FindControl(_dataobjectcontrolinfo.ControlName)).SelectedValue = dataobjects[key.ToString()];
                            break;
                        case 4:
                            if (dataobjects[key.ToString()] != "")
                                ((RadioButtonList)this.FindControl(_dataobjectcontrolinfo.ControlName)).SelectedValue = dataobjects[key.ToString()];
                            break;
                        case 6: //带选择功能的控件
                            if (dataobjects[key.ToString()] != "")
                            {
                                ((MCSSelectControl)this.FindControl(_dataobjectcontrolinfo.ControlName)).SelectValue = dataobjects[key.ToString()];
                                ((MCSSelectControl)this.FindControl(_dataobjectcontrolinfo.ControlName)).SelectText = GetRelateTextByValue(_dataobjct, dataobjects[key.ToString()]);
                            }
                            break;
                        case 7:
                            if (dataobjects[key.ToString()] != "")
                                ((MCSTreeControl)this.FindControl(_dataobjectcontrolinfo.ControlName)).SelectValue = dataobjects[key.ToString()];
                            break;
                    }
                }
                catch { }
            }
        }
    //绑定条件判断环节详细信息
    private void BindConditionProcessInfo(int JobID)
    {
        EWF_Task_JobBLL job = new EWF_Task_JobBLL(JobID);
        EWF_TaskBLL task = new EWF_TaskBLL(job.Model.Task);
        EWF_Flow_ProcessConditionBLL process = new EWF_Flow_ProcessConditionBLL(job.Model.CurrentProcess);
        EWF_Flow_DataObjectBLL dataobject = new EWF_Flow_DataObjectBLL(process.Model.DataObject);

        this.lbl_DataObjectName.Text = dataobject.Model.Name;
        this.lbl_DataObjectDisPlayName.Text = dataobject.Model.DisplayName;

        this.lbl_DataObjectValue.Text = task.GetDataObjectValue()[dataobject.Model.Name]; ;
        this.lbl_OperatorTypeName.Text = DictionaryBLL.GetDicCollections("EWF_Flow_OperatorType")[process.Model.OperatorType.ToString()].Name;

        this.lbl_Value1.Text = process.Model.Value1;
        this.lbl_Value2.Text = process.Model.Value2;
    }
Exemplo n.º 6
0
        /// <summary>
        /// Bind data to the control by special NameValueCollection
        /// </summary>
        public void BindData(NameValueCollection dataobjects)
        {
            foreach (object key in HTDataObjectControlInfo.Keys)
            {
                DataObjectControlInfo _dataobjectcontrolinfo = (DataObjectControlInfo)HTDataObjectControlInfo[key];
                EWF_Flow_DataObject   _dataobjct             = new EWF_Flow_DataObjectBLL(_dataobjectcontrolinfo.DataObjectID).Model;

                try
                {
                    switch (_dataobjectcontrolinfo.ControlType)
                    {
                    case 1:     //Label控件
                        if (_dataobjct.RelationType == 3)
                        {
                            ((Label)this.FindControl(_dataobjectcontrolinfo.ControlName)).Text = dataobjects[key.ToString()];
                        }
                        else
                        {
                            if (_dataobjct.RelationType == 2 && new UD_TableListBLL(_dataobjct.RelationTableName).Model.TreeFlag == "Y")
                            {
                                //关联到实体树形结构表时,显示全路径
                                int value = 0;
                                if (int.TryParse(dataobjects[key.ToString()], out value))
                                {
                                    ((Label)this.FindControl(_dataobjectcontrolinfo.ControlName)).Text = TreeTableBLL.GetFullPathName(_dataobjct.RelationTableName, value);
                                }
                            }
                            else
                            {
                                ((Label)this.FindControl(_dataobjectcontrolinfo.ControlName)).Text = GetRelateTextByValue(_dataobjct, dataobjects[key.ToString()]);
                            }
                        }
                        break;

                    case 2:
                    case 5:
                        if (_dataobjct.RelationType == 3)
                        {
                            ((TextBox)this.FindControl(_dataobjectcontrolinfo.ControlName)).Text = dataobjects[key.ToString()];
                        }
                        else
                        {
                            ((TextBox)this.FindControl(_dataobjectcontrolinfo.ControlName)).Text = GetRelateTextByValue(_dataobjct, dataobjects[key.ToString()]);
                        }
                        break;

                    case 3:
                        if (dataobjects[key.ToString()] != "")
                        {
                            ((DropDownList)this.FindControl(_dataobjectcontrolinfo.ControlName)).SelectedValue = dataobjects[key.ToString()];
                        }
                        break;

                    case 4:
                        if (dataobjects[key.ToString()] != "")
                        {
                            ((RadioButtonList)this.FindControl(_dataobjectcontrolinfo.ControlName)).SelectedValue = dataobjects[key.ToString()];
                        }
                        break;

                    case 6:     //带选择功能的控件
                        if (dataobjects[key.ToString()] != "")
                        {
                            ((MCSSelectControl)this.FindControl(_dataobjectcontrolinfo.ControlName)).SelectValue = dataobjects[key.ToString()];
                            ((MCSSelectControl)this.FindControl(_dataobjectcontrolinfo.ControlName)).SelectText  = GetRelateTextByValue(_dataobjct, dataobjects[key.ToString()]);
                        }
                        break;

                    case 7:
                        if (dataobjects[key.ToString()] != "")
                        {
                            ((MCSTreeControl)this.FindControl(_dataobjectcontrolinfo.ControlName)).SelectValue = dataobjects[key.ToString()];
                        }
                        break;
                    }
                }
                catch { }
            }
        }