Ejemplo n.º 1
0
        public int UpdateUserProfile(HelpDeskEntities.Account.User usr, List <int> mdls, out string msg)
        {
            var flag = usrRepo.UpdateUserProfile(usr, out msg);
            var msg1 = "";

            if (mdls != null)
            {
                if (mdls.Count > 0)
                {
                    usrRepo.ResetAllModules(usr.UID);
                    foreach (var m in mdls)
                    {
                        usrRepo.UpdateUserModule(m, usr.UID, out msg1);
                    }
                }
            }
            return(flag);
        }
Ejemplo n.º 2
0
        public int AddNewUser(HelpDeskEntities.Account.User usr, List <int> mdls, out string msg)
        {
            usr.Password = GenericClass.Hash(usr.Password);
            var InsertedId = usrRepo.AddNewUser(usr, out msg);

            if (mdls != null)
            {
                if (InsertedId > 0 && mdls.Count > 0)
                {
                    var currentUser = GetUserList(usr.EmailID).FirstOrDefault();
                    foreach (var m in mdls)
                    {
                        usrRepo.UpdateUserModule(m, currentUser.UID, out msg);
                    }
                }
            }
            return(InsertedId);
        }