Commit 07ec0296771f347ca9ea9cdfa2687a1451b1fc81
1 parent
72261b59
db update
Showing
2 changed files
with
76 additions
and
1 deletions
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
@@ -2615,6 +2615,18 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does | @@ -2615,6 +2615,18 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does | ||
2615 | <Parameter Name="Status" Type="int" Mode="InOut" /> | 2615 | <Parameter Name="Status" Type="int" Mode="InOut" /> |
2616 | </Function> | 2616 | </Function> |
2617 | <Function Name="usp_DB_TblRowCOUNT" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" /> | 2617 | <Function Name="usp_DB_TblRowCOUNT" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" /> |
2618 | + <Function Name="usp_GetAccountTypeList" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> | ||
2619 | + <Parameter Name="Id" Type="int" Mode="In" /> | ||
2620 | + </Function> | ||
2621 | + <Function Name="usp_GetUserType" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> | ||
2622 | + <Parameter Name="id" Type="int" Mode="In" /> | ||
2623 | + </Function> | ||
2624 | + <Function Name="usp_UpdateUserId" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> | ||
2625 | + <Parameter Name="Id" Type="int" Mode="In" /> | ||
2626 | + <Parameter Name="UserId" Type="varchar" Mode="In" /> | ||
2627 | + <Parameter Name="olduserId" Type="varchar" Mode="In" /> | ||
2628 | + <Parameter Name="Status" Type="int" Mode="InOut" /> | ||
2629 | + </Function> | ||
2618 | <EntityContainer Name="AIADatabaseV5ModelStoreContainer"> | 2630 | <EntityContainer Name="AIADatabaseV5ModelStoreContainer"> |
2619 | <EntitySet Name="AccountType" EntityType="Self.AccountType" Schema="dbo" store:Type="Tables" /> | 2631 | <EntitySet Name="AccountType" EntityType="Self.AccountType" Schema="dbo" store:Type="Tables" /> |
2620 | <EntitySet Name="Activity" EntityType="Self.Activity" Schema="dbo" store:Type="Tables" /> | 2632 | <EntitySet Name="Activity" EntityType="Self.Activity" Schema="dbo" store:Type="Tables" /> |
@@ -6039,6 +6051,18 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin | @@ -6039,6 +6051,18 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin | ||
6039 | <Parameter Name="sStartDate" Mode="In" Type="String" /> | 6051 | <Parameter Name="sStartDate" Mode="In" Type="String" /> |
6040 | <Parameter Name="sEndDate" Mode="In" Type="String" /> | 6052 | <Parameter Name="sEndDate" Mode="In" Type="String" /> |
6041 | </FunctionImport> | 6053 | </FunctionImport> |
6054 | + <FunctionImport Name="usp_GetAccountTypeList" ReturnType="Collection(AIADatabaseV5Model.usp_GetAccountTypeList_Result)"> | ||
6055 | + <Parameter Name="Id" Mode="In" Type="Int32" /> | ||
6056 | + </FunctionImport> | ||
6057 | + <FunctionImport Name="usp_GetUserType" ReturnType="Collection(AIADatabaseV5Model.usp_GetUserType_Result)"> | ||
6058 | + <Parameter Name="id" Mode="In" Type="Int32" /> | ||
6059 | + </FunctionImport> | ||
6060 | + <FunctionImport Name="usp_UpdateUserId"> | ||
6061 | + <Parameter Name="Id" Mode="In" Type="Int32" /> | ||
6062 | + <Parameter Name="UserId" Mode="In" Type="String" /> | ||
6063 | + <Parameter Name="olduserId" Mode="In" Type="String" /> | ||
6064 | + <Parameter Name="Status" Mode="InOut" Type="Int32" /> | ||
6065 | + </FunctionImport> | ||
6042 | </EntityContainer> | 6066 | </EntityContainer> |
6043 | <ComplexType Name="DA_GetBaseLayer_Result"> | 6067 | <ComplexType Name="DA_GetBaseLayer_Result"> |
6044 | <Property Type="Int32" Name="Id" Nullable="false" /> | 6068 | <Property Type="Int32" Name="Id" Nullable="false" /> |
@@ -6838,6 +6862,14 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin | @@ -6838,6 +6862,14 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin | ||
6838 | <Property Type="String" Name="EndDate" Nullable="true" MaxLength="10" /> | 6862 | <Property Type="String" Name="EndDate" Nullable="true" MaxLength="10" /> |
6839 | <Property Type="String" Name="Status" Nullable="false" MaxLength="8" /> | 6863 | <Property Type="String" Name="Status" Nullable="false" MaxLength="8" /> |
6840 | </ComplexType> | 6864 | </ComplexType> |
6865 | + <ComplexType Name="usp_GetAccountTypeList_Result"> | ||
6866 | + <Property Type="Byte" Name="Id" Nullable="false" /> | ||
6867 | + <Property Type="String" Name="Title" Nullable="false" MaxLength="50" /> | ||
6868 | + </ComplexType> | ||
6869 | + <ComplexType Name="usp_GetUserType_Result"> | ||
6870 | + <Property Type="Byte" Name="Id" Nullable="false" /> | ||
6871 | + <Property Type="String" Name="Title" Nullable="false" MaxLength="50" /> | ||
6872 | + </ComplexType> | ||
6841 | </Schema> | 6873 | </Schema> |
6842 | </edmx:ConceptualModels> | 6874 | </edmx:ConceptualModels> |
6843 | <!-- C-S mapping content --> | 6875 | <!-- C-S mapping content --> |
@@ -9127,6 +9159,23 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin | @@ -9127,6 +9159,23 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin | ||
9127 | </ComplexTypeMapping> | 9159 | </ComplexTypeMapping> |
9128 | </ResultMapping> | 9160 | </ResultMapping> |
9129 | </FunctionImportMapping> | 9161 | </FunctionImportMapping> |
9162 | + <FunctionImportMapping FunctionImportName="usp_GetAccountTypeList" FunctionName="AIADatabaseV5Model.Store.usp_GetAccountTypeList"> | ||
9163 | + <ResultMapping> | ||
9164 | + <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetAccountTypeList_Result"> | ||
9165 | + <ScalarProperty Name="Id" ColumnName="Id" /> | ||
9166 | + <ScalarProperty Name="Title" ColumnName="Title" /> | ||
9167 | + </ComplexTypeMapping> | ||
9168 | + </ResultMapping> | ||
9169 | + </FunctionImportMapping> | ||
9170 | + <FunctionImportMapping FunctionImportName="usp_GetUserType" FunctionName="AIADatabaseV5Model.Store.usp_GetUserType"> | ||
9171 | + <ResultMapping> | ||
9172 | + <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetUserType_Result"> | ||
9173 | + <ScalarProperty Name="Id" ColumnName="Id" /> | ||
9174 | + <ScalarProperty Name="Title" ColumnName="Title" /> | ||
9175 | + </ComplexTypeMapping> | ||
9176 | + </ResultMapping> | ||
9177 | + </FunctionImportMapping> | ||
9178 | + <FunctionImportMapping FunctionImportName="usp_UpdateUserId" FunctionName="AIADatabaseV5Model.Store.usp_UpdateUserId" /> | ||
9130 | </EntityContainerMapping> | 9179 | </EntityContainerMapping> |
9131 | </Mapping> | 9180 | </Mapping> |
9132 | </edmx:Mappings> | 9181 | </edmx:Mappings> |
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs
@@ -13,6 +13,7 @@ namespace AIAHTML5.ADMIN.API.Models | @@ -13,6 +13,7 @@ namespace AIAHTML5.ADMIN.API.Models | ||
13 | public string LastName { get; set; } | 13 | public string LastName { get; set; } |
14 | public string EmailId { get; set; } | 14 | public string EmailId { get; set; } |
15 | public string LoginId { get; set; } | 15 | public string LoginId { get; set; } |
16 | + public string NewLoginId { get; set; } | ||
16 | public string Password { get; set; } | 17 | public string Password { get; set; } |
17 | public int SecurityQuestionId { get; set; } | 18 | public int SecurityQuestionId { get; set; } |
18 | public string SecurityAnswer { get; set; } | 19 | public string SecurityAnswer { get; set; } |
@@ -44,7 +45,6 @@ namespace AIAHTML5.ADMIN.API.Models | @@ -44,7 +45,6 @@ namespace AIAHTML5.ADMIN.API.Models | ||
44 | return false; | 45 | return false; |
45 | } | 46 | } |
46 | } | 47 | } |
47 | - | ||
48 | public static bool UpdateUserPassword(AIADatabaseV5Entities dbContext, int intUserID, string newPassword) | 48 | public static bool UpdateUserPassword(AIADatabaseV5Entities dbContext, int intUserID, string newPassword) |
49 | { | 49 | { |
50 | var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); | 50 | var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); |
@@ -58,5 +58,31 @@ namespace AIAHTML5.ADMIN.API.Models | @@ -58,5 +58,31 @@ namespace AIAHTML5.ADMIN.API.Models | ||
58 | return false; | 58 | return false; |
59 | } | 59 | } |
60 | } | 60 | } |
61 | + public static string UpdateUserId(AIADatabaseV5Entities dbContext, int id, string userId, string oldUserId) | ||
62 | + { | ||
63 | + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); | ||
64 | + try | ||
65 | + { | ||
66 | + dbContext.usp_UpdateUserId(id, userId, oldUserId, spStatus); | ||
67 | + if (spStatus.Value.ToString() == "1") | ||
68 | + { | ||
69 | + // return "success"; | ||
70 | + return "1"; | ||
71 | + } | ||
72 | + else if (spStatus.Value.ToString() == "2") | ||
73 | + { | ||
74 | + return "2"; | ||
75 | + // return "Already Exist Userid"; | ||
76 | + } | ||
77 | + else | ||
78 | + { | ||
79 | + return "fail"; | ||
80 | + } | ||
81 | + } | ||
82 | + catch (Exception ex) | ||
83 | + { | ||
84 | + return ex.Message; | ||
85 | + } | ||
86 | + } | ||
61 | } | 87 | } |
62 | } | 88 | } |
63 | \ No newline at end of file | 89 | \ No newline at end of file |