UserModel.cs
2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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;
}
}
}
}