Exemplo n.º 1
0
 internal static bool ImportLector_right(Dictionary <string, string> mapCourseLector, out string serr)
 {
     serr = string.Empty;
     try
     {
         foreach (var entry in mapCourseLector)
         {
             var lectors   = entry.Value.Split(new char[] { '/' }, StringSplitOptions.RemoveEmptyEntries);
             var sCourseNo = entry.Key;
             if (string.IsNullOrEmpty(sCourseNo) || null == lectors || !lectors.Any())
             {
                 continue;
             }
             foreach (var slec in lectors)
             {
                 AddByWorkID(slec.Trim());
             }
             LectorCourseLinkInfo.AddLink(sCourseNo, lectors);
         }
     }
     catch (Exception ex)
     {
         LogHelper.WriteInfo(typeof(LectorInfo), ex.Message);
         serr = ex.Message;
         return(false);
     }
     return(true);
 }
Exemplo n.º 2
0
        internal static void ModifyGrant(string slecID, List <string> lSels)
        {
            if (string.IsNullOrEmpty(slecID) /*|| 0 == lSels.Count*/)
            {
                return;
            }

            //1) clear all grant
            RemoveGrant(slecID, string.Empty);
            //2) grant selected lectors
            LectorCourseLinkInfo.AddLinkByLectorID(slecID, lSels);
        }
Exemplo n.º 3
0
        internal static void ModifyGrant(string courseId, List <string> lectors)
        {
            if (string.IsNullOrEmpty(courseId) /*|| 0 == lectors.Count*/)
            {
                return;
            }

            //1) clear all grant
            RemoveGrant(courseId, string.Empty);
            //2) grant selected lectors
            LectorCourseLinkInfo.AddLinkByCourseID(courseId, lectors);
        }