コード例 #1
0
        /// <summary>
        /// To Verify the User
        /// </summary>
        /// <CreatedBy>Bhushan Dod</CreatedBy>
        /// <CreatedDate>2016-10-08</CreatedDate>
        /// <param name="UserId"></param>
        /// <param name="DeletedBy"></param>
        public Result UpdateVerifyUser(long UserId, long ModifiedBy, DARModel objDAR)
        {
            Result result;

            try
            {
                ObjUserRepository      = new UserRepository();
                objCommonMethodManager = new CommonMethodManager();
                UserRegistration obj_UserRegistration = ObjUserRepository.GetAll(x => x.UserId == UserId).FirstOrDefault();
                if (obj_UserRegistration != null)
                {
                    obj_UserRegistration.IsLoginActive = true;
                    obj_UserRegistration.IsEmailVerify = true;
                    obj_UserRegistration.ModifiedDate  = DateTime.UtcNow;
                    obj_UserRegistration.ModifiedBy    = ModifiedBy;
                    ObjUserRepository.SaveChanges();

                    objDAR.TaskType        = (long)TaskTypeCategory.UserUpdate;
                    objDAR.ActivityDetails = DarMessage.UserVerifiedDar(obj_UserRegistration.FirstName + ' ' + obj_UserRegistration.LastName);

                    #region Save DAR
                    result = objCommonMethodManager.SaveDAR(objDAR);
                    #endregion Save DAR
                    return(Result.UpdatedSuccessfully);
                }
                else
                {
                    return(Result.DoesNotExist);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }