示例#1
0
        public string SaveSecurityGroupMember2(string memberType, string operation, GroupOperation parameter)
        {
            try
            {
                string para = " @Operate,@UserID,@UserRole,@SchoolYear,@SchoolCode,@AppID,@GroupID,@MemberID,@AppRole";
                string sp   = "dbo.SIC_sys_UserGroupMember_Students";
                if (memberType == "Students")
                {
                    if (operation != "Delete")
                    {
                        para = para + ",@GroupType,@Comments";
                    }
                }

                if (memberType == "Teachers")
                {
                    sp = "dbo.SIC_sys_UserGroupMember_Teachers";
                    if (operation != "Delete")
                    {
                        para = para + ",@StartDate,@EndDate,@Comments";
                    }
                }
                string result = AppsBase.GeneralValue <string>(sp + para, parameter);
                return(result);
            }
            catch (Exception ex)
            {
                var em = ex.Message;
                return("Failed");
            }
        }
示例#2
0
 public string SaveGroupTeacher(string operation, GroupOperation parameter)
 {
     try
     {
         parameter.Operate = operation;
         string sp     = "dbo.SIC_sys_UserGroupMember_Teachers @Operate,@UserID,@UserRole,@SchoolYear,@SchooCode,@CPNum,@AppID,@GroupID,@Permission,@StartDate,@EndDate,@Comments";
         string result = AppsBase.GeneralValue <string>(sp, parameter);
         return(result);
     }
     catch (Exception ex)
     {
         var em = ex.Message;
         return("Failed");
     }
 }