using System; using System.Collections.Generic; using System.Linq; using System.Web; using AIAHTML5.ADMIN.API.Entity; namespace AIAHTML5.ADMIN.API.Models { public class UserModel { public int Id { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public string EmailId { get; set; } public string LoginId { get; set; } public string Password { get; set; } public int SecurityQuestionId { get; set; } public string SecurityAnswer { get; set; } public int CreatorId { get; set; } public DateTime CreationDate { get; set; } public DateTime DeactivationDate { get; set; } public int ModifierId { get; set; } public DateTime ModifiedDate { get; set; } public int UserTypeId { get; set; } public bool IsActive { get; set; } public static bool UpdateUserProfile(AIADatabaseV5Entities dbContext, int intUserID, string strFirstName, string strLastName, string strEmailID) { var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); try { dbContext.UpdateUserProfile(intUserID, strFirstName, strLastName, strEmailID, spStatus); if (spStatus.Value.ToString() == "1") { return true; } else { return false; } } catch (Exception ex) { return false; } } public static bool UpdateUserPassword(AIADatabaseV5Entities dbContext, int intUserID, string newPassword) { var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); try { dbContext.UpdateAiaUserPassword(intUserID, newPassword, spStatus); return (bool)spStatus.Value; } catch (Exception ex) { return false; } } } }