public TransactionResult <MST_UserInfo> BL_SaveUser(UserDetailsVM p_UserVM) { if (BL_CheckForEmailAvailability(p_UserVM.SignUpEmail)) { return(new TransactionResult <MST_UserInfo> { Success = false, RedirectURL = "/Home/Index", Message = "Email already Exists,Please use forgot password section to generate new password." }); } else { return(new TransactionResult <MST_UserInfo> { Success = true, Data = IUserObj.Insert(new MST_UserInfo { FirstName = p_UserVM.FirstName, LastName = p_UserVM.LastName, CountryId = p_UserVM.CountryId, Email = p_UserVM.SignUpEmail, Password = new MD5Hashing().GetMd5Hash(p_UserVM.SignUpPassword), IsActive = true, IsAdmin = false, CreatedDate = DateTime.UtcNow }).Data }); } }
public bool BL_UpdateUser(UserDetailsVM p_UserVM) { return(IUserObj.Update(new MST_UserInfo { FirstName = p_UserVM.FirstName, LastName = p_UserVM.LastName, CountryId = p_UserVM.CountryId, Email = p_UserVM.SignUpEmail }).TransactionResult); }
public UserController(IUserObj userobj, IConfiguration configuration) { _userobj = userobj; // string path = configuration["PdfPath"]; //PdfFile obj = new PdfFile(path); //obj.CreatePdf(path, "test2.pdf"); //obj.ReadPdfFile(path + "IP-2958_V1(1)2.pdf"); Configuration = configuration; //SmtpClient client = new SmtpClient("mysmtpserver"); //client.UseDefaultCredentials = false; //client.Credentials = new NetworkCredential("mailid", "password"); //MailMessage mailMessage = new MailMessage(); //mailMessage.From = new MailAddress("*****@*****.**"); //mailMessage.To.Add("*****@*****.**"); //mailMessage.Body = "hi this is from code"; //mailMessage.Subject = "test mail"; //client.Send(mailMessage); }
public bool BL_DeleteUser(int p_UserId) { return(IUserObj.Delete(p_UserId).TransactionResult); }
public AccountController(IUserObj userobj, IConfiguration configuration) { _iuserobj = userobj; this.configuration = configuration; }