示例#1
0
        public ActionResult ChnageUserApproval(LocalUser model)
        {
            var user     = UserAdminService.ApprovalStatus(model);
            var feedback = "";

            if (!model.IsApproved)
            {
                KaamShaam.Services.EmailService.SendEmail(user.Email, "User Account Status Changed - KamSham.Pk", user.FullName + " admin has deleted your account. Please review your account.\n Feedback : " + feedback);
                // sms is in DeleteUser method
            }
            else
            {
                KaamShaam.Services.EmailService.SendEmail(user.Email, "User Account Status Changed - KamSham.Pk", user.FullName + " we noticed that admin has updated your account status. Please review your account." + feedback);
                KaamShaam.Services.EmailService.SendSms(user.Mobile, "Your account status has been changed. Please visit https://kamsham.pk");
            }


            if (!model.IsApproved)
            {
                AdminService.DeleteUser(new AspNetUser {
                    Id = model.Id
                }, model.Feedback);
            }

            return(Json(true, JsonRequestBehavior.AllowGet));
        }
示例#2
0
 public ActionResult ChnageVendorsApproval(LocalUser model)
 {
     UserAdminService.ApprovalStatus(model);
     return(Json(true, JsonRequestBehavior.AllowGet));
 }