Commit f26f30f6b8f449475170a8cbee84af8345010c2c

Authored by Amrita Vishnoi
2 parents ee401d22 8d6b5c99

Merge branch 'Develop' of http://gitlab.ebix.com/ADAM/AIAHTML5 into Develop

400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/SubscriptionPriceController.cs
... ... @@ -108,14 +108,14 @@ namespace AIAHTML5.ADMIN.API.Controllers
108 108 }
109 109 }
110 110  
111   - [Route("DeleteSubscriptionPrices")]
  111 + [Route("DeleteSubscriptionPrice")]
112 112 [HttpPost]
113   - public HttpResponseMessage DeleteSubscriptionPrices(List<int> subscriptionPriceIds)
  113 + public HttpResponseMessage DeleteSubscriptionPrice(int subscriptionPriceId)
114 114 {
115 115 bool Status = false;
116 116 try
117 117 {
118   - Status = SubscriptionPriceModel.DeleteSubscriptionPrices(dbContext, subscriptionPriceIds);
  118 + Status = SubscriptionPriceModel.DeleteSubscriptionPrice(dbContext, subscriptionPriceId);
119 119 if (Status)
120 120 {
121 121 return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
... ... @@ -132,6 +132,22 @@ namespace AIAHTML5.ADMIN.API.Controllers
132 132 }
133 133 }
134 134  
  135 + [Route("CheckSubscriptionPlanForLicense")]
  136 + [HttpGet]
  137 + public HttpResponseMessage CheckSubscriptionPlanForLicense(int subscriptionPriceId)
  138 + {
  139 + bool Status = false;
  140 + try
  141 + {
  142 + Status = SubscriptionPriceModel.CheckSubscriptionPlanForLicense(dbContext, subscriptionPriceId);
  143 + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
  144 + }
  145 + catch (Exception ex)
  146 + {
  147 + // Log exception code goes here
  148 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  149 + }
  150 + }
135 151 protected HttpResponseMessage ToJson(dynamic obj)
136 152 {
137 153 var response = Request.CreateResponse(HttpStatusCode.OK);
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserGroupController.cs
... ... @@ -139,5 +139,22 @@ namespace AIAHTML5.ADMIN.API.Controllers
139 139 return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
140 140 }
141 141 }
  142 +
  143 + [Route("CheckDuplicateLicenseUserGroup")]
  144 + [HttpGet]
  145 + public HttpResponseMessage CheckDuplicateLicenseUserGroup(int LicenseId, string Title)
  146 + {
  147 + bool Status = false;
  148 + try
  149 + {
  150 + Status = UserGroupModel.CheckDuplicateLicenseUserGroup(dbContext, LicenseId, Title);
  151 + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
  152 + }
  153 + catch (Exception ex)
  154 + {
  155 + // Log exception code goes here
  156 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  157 + }
  158 + }
142 159 }
143 160 }
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
... ... @@ -3908,5 +3908,27 @@ namespace AIAHTML5.ADMIN.API.Entity
3908 3908  
3909 3909 return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_InsertResellerLicenseAccount_Result>("usp_InsertResellerLicenseAccount", sLicenseeFnameParameter, sLicenseeLnameParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sInstitutionNameParameter, sAddress1Parameter, sAddress2Parameter, sCityParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, sPhoneParameter, sEmailIdParameter, iTotalLoginsParameter, sStartDateParameter, sEndDateParameter, sEditionListParameter, iTotalPriceParameter, iCreatorIdParameter, sProductKeyParameter, iNoofImagesParameter);
3910 3910 }
  3911 +
  3912 + public virtual int usp_CheckDuplicateLicenseUserGroup(Nullable<int> licenseId, string title, ObjectParameter status)
  3913 + {
  3914 + var licenseIdParameter = licenseId.HasValue ?
  3915 + new ObjectParameter("LicenseId", licenseId) :
  3916 + new ObjectParameter("LicenseId", typeof(int));
  3917 +
  3918 + var titleParameter = title != null ?
  3919 + new ObjectParameter("Title", title) :
  3920 + new ObjectParameter("Title", typeof(string));
  3921 +
  3922 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_CheckDuplicateLicenseUserGroup", licenseIdParameter, titleParameter, status);
  3923 + }
  3924 +
  3925 + public virtual int usp_CheckSubscriptionForLicense(Nullable<byte> id, ObjectParameter status)
  3926 + {
  3927 + var idParameter = id.HasValue ?
  3928 + new ObjectParameter("Id", id) :
  3929 + new ObjectParameter("Id", typeof(byte));
  3930 +
  3931 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_CheckSubscriptionForLicense", idParameter, status);
  3932 + }
3911 3933 }
3912 3934 }
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
... ... @@ -2664,6 +2664,15 @@ warning 6002: The table/view &#39;AIADatabaseV5.dbo.VocabTermNumberToSystemMap&#39; does
2664 2664 <Parameter Name="AccountNo" Type="varchar" Mode="In" />
2665 2665 <Parameter Name="Status" Type="bit" Mode="InOut" />
2666 2666 </Function>
  2667 + <Function Name="usp_CheckDuplicateLicenseUserGroup" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2668 + <Parameter Name="LicenseId" Type="int" Mode="In" />
  2669 + <Parameter Name="Title" Type="varchar" Mode="In" />
  2670 + <Parameter Name="Status" Type="bit" Mode="InOut" />
  2671 + </Function>
  2672 + <Function Name="usp_CheckSubscriptionForLicense" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2673 + <Parameter Name="Id" Type="tinyint" Mode="In" />
  2674 + <Parameter Name="Status" Type="bit" Mode="InOut" />
  2675 + </Function>
2667 2676 <Function Name="usp_DB_TblRowCOUNT" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" />
2668 2677 <Function Name="usp_DeleteLicenseUserGroup" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
2669 2678 <Parameter Name="UserGroupId" Type="int" Mode="In" />
... ... @@ -6635,6 +6644,15 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]&lt;/Definin
6635 6644 <Parameter Name="sProductKey" Mode="In" Type="String" />
6636 6645 <Parameter Name="iNoofImages" Mode="In" Type="Int32" />
6637 6646 </FunctionImport>
  6647 + <FunctionImport Name="usp_CheckDuplicateLicenseUserGroup">
  6648 + <Parameter Name="LicenseId" Mode="In" Type="Int32" />
  6649 + <Parameter Name="Title" Mode="In" Type="String" />
  6650 + <Parameter Name="Status" Mode="InOut" Type="Boolean" />
  6651 + </FunctionImport>
  6652 + <FunctionImport Name="usp_CheckSubscriptionForLicense">
  6653 + <Parameter Name="Id" Mode="In" Type="Byte" />
  6654 + <Parameter Name="Status" Mode="InOut" Type="Boolean" />
  6655 + </FunctionImport>
6638 6656 </EntityContainer>
6639 6657 <ComplexType Name="DA_GetBaseLayer_Result">
6640 6658 <Property Type="Int32" Name="Id" Nullable="false" />
... ... @@ -10205,6 +10223,8 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]&lt;/Definin
10205 10223 </ComplexTypeMapping>
10206 10224 </ResultMapping>
10207 10225 </FunctionImportMapping>
  10226 + <FunctionImportMapping FunctionImportName="usp_CheckDuplicateLicenseUserGroup" FunctionName="AIADatabaseV5Model.Store.usp_CheckDuplicateLicenseUserGroup" />
  10227 + <FunctionImportMapping FunctionImportName="usp_CheckSubscriptionForLicense" FunctionName="AIADatabaseV5Model.Store.usp_CheckSubscriptionForLicense" />
10208 10228 </EntityContainerMapping>
10209 10229 </Mapping>
10210 10230 </edmx:Mappings>
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
... ... @@ -110,7 +110,6 @@ namespace AIAHTML5.ADMIN.API.Models
110 110 {
111 111 List<Tuple<int, string>> LicenseAccountList = new List<Tuple<int, string>>();
112 112 Tuple<int, string> LicenseAccountObj;
113   - int i = 0;
114 113 try
115 114 {
116 115 var result = dbContext.usp_GetAccountNumber(LicenseType).ToList();
... ... @@ -120,8 +119,6 @@ namespace AIAHTML5.ADMIN.API.Models
120 119 {
121 120 LicenseAccountObj = new Tuple<int, string>(item.Id, item.AccountNumber);
122 121 LicenseAccountList.Add(LicenseAccountObj);
123   - i++;
124   - if (i >= 100) break;
125 122 }
126 123 }
127 124 }
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/SubscriptionPriceModel.cs
... ... @@ -79,16 +79,12 @@ namespace AIAHTML5.ADMIN.API.Models
79 79 }
80 80 }
81 81  
82   - public static bool DeleteSubscriptionPrices(AIADatabaseV5Entities dbContext, List<int> subscriptionPriceIds)
  82 + public static bool DeleteSubscriptionPrice(AIADatabaseV5Entities dbContext, int subscriptionPriceId)
83 83 {
84 84 var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
85 85 try
86 86 {
87   - foreach (var item in subscriptionPriceIds)
88   - {
89   - dbContext.usp_DeleteSubscriptionPlan((byte?)item, spStatus);
90   - if (!(bool)spStatus.Value) break;
91   - }
  87 + dbContext.usp_DeleteSubscriptionPlan((byte?)subscriptionPriceId, spStatus);
92 88 return (bool)spStatus.Value;
93 89 }
94 90 catch (Exception ex)
... ... @@ -96,5 +92,19 @@ namespace AIAHTML5.ADMIN.API.Models
96 92 return false;
97 93 }
98 94 }
  95 + public static bool CheckSubscriptionPlanForLicense(AIADatabaseV5Entities dbContext, int subscriptionPriceId)
  96 + {
  97 + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
  98 + try
  99 + {
  100 + dbContext.usp_CheckSubscriptionForLicense((byte?)subscriptionPriceId, spStatus);
  101 + return (bool)spStatus.Value;
  102 + }
  103 + catch (Exception ex)
  104 + {
  105 + return false;
  106 + }
  107 + }
  108 +
99 109 }
100 110 }
101 111 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserGroupModel.cs
... ... @@ -113,6 +113,20 @@ namespace AIAHTML5.ADMIN.API.Models
113 113 }
114 114 }
115 115  
  116 + public static bool CheckDuplicateLicenseUserGroup(AIADatabaseV5Entities dbContext, int LicenseId, string Title)
  117 + {
  118 + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
  119 + try
  120 + {
  121 + dbContext.usp_CheckDuplicateLicenseUserGroup(LicenseId, Title, spStatus);
  122 + return (bool)spStatus.Value;
  123 + }
  124 + catch (Exception ex)
  125 + {
  126 + return false;
  127 + }
  128 + }
  129 +
116 130 }
117 131  
118 132 }
119 133 \ No newline at end of file
... ...
500-DBDump/AIA-StoredProcedures/dbo.GetNetAdSummaryReport.StoredProcedure.sql
1 1 Binary files a/500-DBDump/AIA-StoredProcedures/dbo.GetNetAdSummaryReport.StoredProcedure.sql and b/500-DBDump/AIA-StoredProcedures/dbo.GetNetAdSummaryReport.StoredProcedure.sql differ
... ...
500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.sql
1 1 Binary files a/500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.sql and b/500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.sql differ
... ...
500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.sql
1 1 Binary files a/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.sql and b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.sql differ
... ...