예제 #1
0
    /// ****************************************************************************
    /// <summary>
    /// 会签控件数据绑定
    /// 世茂特殊要求(2个项目总监会签)
    /// </summary>
    /// ****************************************************************************
    private void rptMeetSign_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
    {
        string ud_sRoleName, ud_sUserCode;

        switch (e.Item.ItemType)
        {
        case ListItemType.AlternatingItem:
            ud_sRoleName = ((DataRowView)e.Item.DataItem).Row["RoleName"].ToString();
            ud_sUserCode = ((DataRowView)e.Item.DataItem).Row["UserCode"].ToString();

            WorkFlowFormOpinion ud_AltwfoControl = (WorkFlowFormOpinion)e.Item.FindControl("wfoAlternatingItemOpinion");
            ud_AltwfoControl.IsRdoCheck           = false;
            ud_AltwfoControl.IsUseTemplateOpinion = true;
            ud_AltwfoControl.IsUseTextArea        = true;
            OpinionControlInit(ud_sRoleName + "意见", "SM_CAA_" + ud_sRoleName, ud_sRoleName, ud_AltwfoControl);
            break;

        case ListItemType.Item:
            ud_sRoleName = ((DataRowView)e.Item.DataItem).Row["RoleName"].ToString();
            ud_sUserCode = ((DataRowView)e.Item.DataItem).Row["UserCode"].ToString();
            WorkFlowFormOpinion ud_wfoControl = (WorkFlowFormOpinion)e.Item.FindControl("wfoItemOpinion");
            ud_wfoControl.IsRdoCheck           = false;
            ud_wfoControl.IsUseTemplateOpinion = true;
            ud_wfoControl.IsUseTextArea        = true;
            OpinionControlInit(ud_sRoleName + "意见", "SM_CAA_" + ud_sRoleName, ud_sRoleName, ud_wfoControl);
            break;

        default:
            break;
        }
    }
예제 #2
0
    protected ModuleState ImageSignControlInit(string pm_sOpinionType, string pm_sModuleName,
                                               WorkFlowFormOpinion pm_wfsImageSign, string pm_sUserCode)
    {
        int ud_iOpinionStateCount = 2;

        ModuleState[] ud_wfmaWorkFlowModuleState = new ModuleState[ud_iOpinionStateCount];

        for (int i = 0; i < ud_iOpinionStateCount; i++)
        {
            ud_wfmaWorkFlowModuleState[i] = this.up_wftToolbar.GetModuleState(pm_sModuleName, i);
        }



        pm_wfsImageSign.OpinionType     = pm_sOpinionType;
        pm_wfsImageSign.ApplicationCode = this.up_wftToolbar.ApplicationCode;
        pm_wfsImageSign.CaseCode        = this.up_wftToolbar.CaseCode;
        pm_wfsImageSign.State           = ud_wfmaWorkFlowModuleState[0];

        if (pm_sUserCode.Trim() != "")
        {
            pm_wfsImageSign.OpinionUserCode = pm_sUserCode;
        }

        pm_wfsImageSign.InitControl();

        return(ud_wfmaWorkFlowModuleState[0]);
    }
예제 #3
0
    /// <param name="po_sConfirmOpinionList">控件名1,控件名2,控件名3,</param>
    /// <param name="pm_sInputType">Text,TextArea,TextAreaEsay,TextNum</param>
    protected ModuleState[] OpinionControlInit(string pm_sOpinionTitle, string pm_sOpinionType, string pm_sModuleName,
                                               WorkFlowFormOpinion pm_wfoOpinion, string pm_sUserCode, object pm_oInputType)
    {
        int ud_iOpinionStateCount = 2;

        ModuleState[] ud_wfmaWorkFlowModuleState = new ModuleState[ud_iOpinionStateCount];

        for (int i = 0; i < ud_iOpinionStateCount; i++)
        {
            ud_wfmaWorkFlowModuleState[i] = this.up_wftToolbar.GetModuleState(pm_sModuleName, i);
        }

        if (ud_wfmaWorkFlowModuleState[1] == ModuleState.Operable)
        {
            this.ConfirmOpinionList += pm_wfoOpinion.UniqueID + ",";
        }

        switch (pm_oInputType.ToString().ToLower())
        {
        case "text":
            pm_wfoOpinion.ControlType = "Text";
            break;

        case "textarea":
            pm_wfoOpinion.ControlType = "TextArea";
            break;

        case "textareaesay":
            pm_wfoOpinion.ControlType = "TextAreaEsay";
            break;

        case "textnum":
            pm_wfoOpinion.ControlType = "TextNum";
            break;

        default:
            break;
        }
        pm_wfoOpinion.Title           = pm_sOpinionTitle;
        pm_wfoOpinion.OpinionType     = pm_sOpinionType;
        pm_wfoOpinion.ApplicationCode = this.up_wftToolbar.ApplicationCode;
        pm_wfoOpinion.CaseCode        = this.up_wftToolbar.CaseCode;
        pm_wfoOpinion.State           = ud_wfmaWorkFlowModuleState[0];
        pm_wfoOpinion.StateConfirm    = ud_wfmaWorkFlowModuleState[1];
        pm_wfoOpinion.ProjectCode     = this.up_wftToolbar.ProjectCode;

        if (pm_sUserCode.Trim() != "")
        {
            pm_wfoOpinion.OpinionUserCode = pm_sUserCode;
        }

        pm_wfoOpinion.InitControl();

        if (ud_wfmaWorkFlowModuleState[1] == ModuleState.Operable)
        {
            this.up_wftToolbar.IsAudit = true;
        }

        return(ud_wfmaWorkFlowModuleState);
    }
예제 #4
0
        /// <param name="po_sConfirmOpinionList">控件名1,控件名2,控件名3,</param>
        /// <param name="pm_sInputType">Text,TextArea,TextAreaEsay,TextNum</param>
        protected WorkFlowControl.ModuleState[] OpinionControlInit(string pm_sOpinionTitle, string pm_sOpinionType, string pm_sModuleName,
                                                                   WorkFlowFormOpinion pm_wfoOpinion, string pm_sUserCode, string pm_sConfirmOpinionList, out string po_sConfirmOpinionList, string pm_sInputType)
        {
            int ud_iOpinionStateCount = 2;

            WorkFlowControl.ModuleState[] ud_wfmaWorkFlowModuleState = new ModuleState[ud_iOpinionStateCount];

            for (int i = 0; i < ud_iOpinionStateCount; i++)
            {
                ud_wfmaWorkFlowModuleState[i] = this.WorkFlowToolbar1.GetModuleState(pm_sModuleName, i);
            }

            if (ud_wfmaWorkFlowModuleState[1] == ModuleState.Operable)
            {
                pm_sConfirmOpinionList += pm_wfoOpinion.UniqueID + ",";
            }

            po_sConfirmOpinionList = pm_sConfirmOpinionList;

            switch (pm_sInputType.ToLower())
            {
            case "text":
                pm_wfoOpinion.ControlType = "Text";
                break;

            case "textarea":
                pm_wfoOpinion.ControlType = "TextArea";
                break;

            case "textareaesay":
                pm_wfoOpinion.ControlType = "TextAreaEsay";
                break;

            case "textnum":
                pm_wfoOpinion.ControlType = "TextNum";
                break;

            default:
                break;
            }
            pm_wfoOpinion.Title           = pm_sOpinionTitle;
            pm_wfoOpinion.OpinionType     = pm_sOpinionType;
            pm_wfoOpinion.ApplicationCode = this.WorkFlowToolbar1.ApplicationCode;
            pm_wfoOpinion.CaseCode        = this.WorkFlowToolbar1.CaseCode;
            pm_wfoOpinion.State           = ud_wfmaWorkFlowModuleState[0];
            pm_wfoOpinion.StateConfirm    = ud_wfmaWorkFlowModuleState[1];

            if (pm_sUserCode.Trim() != "")
            {
                pm_wfoOpinion.OpinionUserCode = pm_sUserCode;
            }

            pm_wfoOpinion.InitControl();

            return(ud_wfmaWorkFlowModuleState);
        }
예제 #5
0
        /// ****************************************************************************
        /// <summary>
        /// 意见输入框加载

        /// </summary>
        /// <param name="OpinionCase">输入框</param>
        /// <param name="Title">标题</param>
        /// <param name="Type">类型</param>
        /// <param name="ApplicationCode">业务代码</param>
        /// <param name="StateName">状态配置名称</param>
        /// ****************************************************************************
        private void LoadOpinionControl(WorkFlowFormOpinion OpinionCase, string Title, string Type, string ApplicationCode, string StateName)
        {
            OpinionCase.Title           = Title;
            OpinionCase.OpinionType     = Type;
            OpinionCase.ApplicationCode = ApplicationCode;
            OpinionCase.CaseCode        = this.WorkFlowToolbar1.CaseCode;
            OpinionCase.State           = this.WorkFlowToolbar1.GetModuleState(StateName);
            if (this.WorkFlowToolbar1.GetModuleState(StateName, 1) == ModuleState.Operable)
            {
                OpinionCase.StateConfirm         = ModuleState.Operable;
                this.ViewState["ConfirmControl"] = OpinionCase.ID;
            }
            OpinionCase.InitControl();
        }
예제 #6
0
 protected WorkFlowControl.ModuleState[] OpinionControlInit(string pm_sOpinionType, string pm_sModuleName,
                                                            WorkFlowFormOpinion pm_wfoOpinion, string pm_sUserCode, string pm_sConfirmOpinionList, out string po_sConfirmOpinionList, string pm_sInputType)
 {
     return(OpinionControlInit("", pm_sOpinionType, pm_sModuleName, pm_wfoOpinion, pm_sUserCode, pm_sConfirmOpinionList, out po_sConfirmOpinionList, pm_sInputType));
 }
예제 #7
0
 /// ****************************************************************************
 /// <summary>
 /// 流程意见控件初始化
 /// </summary>
 /// ****************************************************************************
 protected WorkFlowControl.ModuleState[] OpinionControlInit(string pm_sOpinionTitle, string pm_sOpinionType, string pm_sModuleName,
                                                            WorkFlowFormOpinion pm_wfoOpinion, string pm_sConfirmOpinionList, out string po_sConfirmOpinionList)
 {
     return(OpinionControlInit(pm_sOpinionTitle, pm_sOpinionType, pm_sModuleName, pm_wfoOpinion, "", pm_sConfirmOpinionList, out po_sConfirmOpinionList, ""));
 }
예제 #8
0
 protected ModuleState[] OpinionControlInit(string pm_sOpinionType, string pm_sModuleName,
                                            WorkFlowFormOpinion pm_wfoOpinion, string pm_sUserCode, object pm_oInputType)
 {
     return(OpinionControlInit("", pm_sOpinionType, pm_sModuleName, pm_wfoOpinion, pm_sUserCode, pm_oInputType));
 }
예제 #9
0
 protected ModuleState[] OpinionControlInit(string pm_sOpinionTitle, string pm_sOpinionType, string pm_sModuleName,
                                            WorkFlowFormOpinion pm_wfoOpinion, string pm_sUserCode)
 {
     return(OpinionControlInit(pm_sOpinionTitle, pm_sOpinionType, pm_sModuleName, pm_wfoOpinion, pm_sUserCode, ""));
 }
예제 #10
0
 protected ModuleState[] OpinionControlInit(string pm_sOpinionType, string pm_sModuleName,
                                            WorkFlowFormOpinion pm_wfoOpinion)
 {
     return(OpinionControlInit("", pm_sOpinionType, pm_sModuleName, pm_wfoOpinion, "", ""));
 }
예제 #11
0
    /// ****************************************************************************
    /// <summary>
    /// 获取页面上所有有效确认框的值
    /// </summary>
    /// <param name="pm_iConfirmType">确认框取值原则: 0 多数通过,1 一票否决, 2 一票赞成</param>
    /// ****************************************************************************

    protected string GetOpinionConfirm(string pm_sConfirmOpinionList, int pm_iConfirmType)
    {
        string ud_sOpinionConfirm = "";

        int ud_iApproveCount = 0;
        int ud_iRejectCount  = 0;

        if (pm_sConfirmOpinionList.Trim() != "")
        {
            string[] ud_saConfirmOpinion = pm_sConfirmOpinionList.Split(',');

            for (int i = 0; i < ud_saConfirmOpinion.Length; i++)
            {
                if (ud_saConfirmOpinion[i].Trim() != "")
                {
                    WorkFlowFormOpinion ud_wfoOpinion = (WorkFlowFormOpinion)this.FindControl(ud_saConfirmOpinion[i].Trim());

                    switch (ud_wfoOpinion.OpinionConfirm)
                    {
                    case "Approve":
                        if (pm_iConfirmType == 2)
                        {
                            return("Approve");
                        }
                        else
                        {
                            ud_iApproveCount++;
                        }
                        break;

                    case "Reject":
                        if (pm_iConfirmType == 1)
                        {
                            return("Reject");
                        }
                        else
                        {
                            ud_iRejectCount++;
                        }
                        break;

                    default:
                        break;
                    }
                }
            }

            switch (pm_iConfirmType)
            {
            case 0:
                if (ud_iApproveCount > 0 || ud_iRejectCount > 0)
                {
                    if (ud_iApproveCount >= ud_iRejectCount)
                    {
                        ud_sOpinionConfirm = "Approve";
                    }
                    else
                    {
                        ud_sOpinionConfirm = "Reject";
                    }
                }
                ud_sOpinionConfirm = "Unknow";
                break;

            case 1:
                if (ud_iApproveCount > 0)
                {
                    ud_sOpinionConfirm = "Approve";
                }
                else
                {
                    ud_sOpinionConfirm = "Unknow";
                }
                break;

            case 2:
                if (ud_iRejectCount > 0)
                {
                    ud_sOpinionConfirm = "Reject";
                }
                else
                {
                    ud_sOpinionConfirm = "Unknow";
                }
                break;
            }
        }

        return(ud_sOpinionConfirm);
    }
예제 #12
0
 //图片签名控件初始化
 protected ModuleState ImageSignControlInit(string pm_sOpinionType, string pm_sModuleName,
                                            WorkFlowFormOpinion pm_wfsImageSign)
 {
     return(ImageSignControlInit(pm_sOpinionType, pm_sModuleName, pm_wfsImageSign, ""));
 }