UserModel.cs 1.54 KB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

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.Entity.Core.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;
            }
        }
    }
}