Example #1
0
        /// *******************************************************************************************
        /// <summary>
        /// 保存角色组成到对象中
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// *******************************************************************************************
        protected void btnRoleCompriseSave_ServerClick(object sender, System.EventArgs e)
        {
            try
            {
                Procedure procedure = (Procedure)Session["Procedure"];
                Role      RoleCase  = procedure.GetRole(this.RoleCompriseCode.Value);
                RoleCase.ClearRoleComprises();

                foreach (string sss in this.RoleCompriseUserCodes.Value.Split(new char[] { ',' }))
                {
                    if (sss != "")
                    {
                        RoleComprise RoleCompriseCase = null;
                        RoleCompriseCase = Rms.WorkFlow.DefinitionManager.NewRoleComprise();

                        RoleCase.AddNewRoleComprise(RoleCompriseCase);

                        RoleCompriseCase.ProcedureCode    = procedure.ProcedureCode;
                        RoleCompriseCase.RoleCode         = RoleCase.WorkFlowRoleCode;
                        RoleCompriseCase.RoleCompriseItem = sss;
                        RoleCompriseCase.RoleType         = RoleType.Porson;
                    }
                }
                foreach (string sss in this.RoleCompriseStationCodes.Value.Split(new char[] { ',' }))
                {
                    if (sss != "")
                    {
                        RoleComprise RoleCompriseCase = null;
                        RoleCompriseCase = Rms.WorkFlow.DefinitionManager.NewRoleComprise();

                        RoleCase.AddNewRoleComprise(RoleCompriseCase);

                        RoleCompriseCase.ProcedureCode    = procedure.ProcedureCode;
                        RoleCompriseCase.RoleCode         = RoleCase.WorkFlowRoleCode;
                        RoleCompriseCase.RoleCompriseItem = sss;
                        RoleCompriseCase.RoleType         = RoleType.Station;
                    }
                }
                Session["Procedure"] = procedure;
                this.RoleGridDataBound();
            }
            catch (Exception ex)
            {
                ApplicationLog.WriteLog(this.ToString(), ex, "载入页面出错");
            }
        }