Sirisha 1 yıl önce
ebeveyn
işleme
fcf0415e76
1 değiştirilmiş dosya ile 84 ekleme ve 8 silme
  1. 84
    8
      CRM.Visitors/Managers/VisitorManager.Async.cs

+ 84
- 8
CRM.Visitors/Managers/VisitorManager.Async.cs Dosyayı Görüntüle

13
 {
13
 {
14
     internal partial class VisitorManager : BaseManager, IVisitorManager
14
     internal partial class VisitorManager : BaseManager, IVisitorManager
15
     {
15
     {
16
+        /// <summary>
17
+        /// This method that retrieves pre-visitor information based on the provided code.
18
+        /// </summary>
19
+        /// <param name="srequest">The srequest parameter is used to filter the query</param>
20
+        /// <param name="code"> represents the code associated with the pre-visitor for which information is being retrieved</param>
21
+        /// <returns>This method returns a response containing pre-visitor information
22
+        /// If the pre-visitor is found and its RefStatusId is not equal to 2, indicating that the pre-visitor is not checked out, it returns the pre-visitor information.
23
+        /// If the pre-visitor is not found, it returns an error response with status code "404" and the message "Please Enter A Valid Uniqueid!".
24
+        /// If the pre-visitor is found but its RefStatusId is equal to 2, indicating that the pre-visitor is already checked out, it returns an error response with status code "404" and the message "you have been already checked out".</returns>
16
         [SelectMethod(ApiName = "Get  pre visitors", AppName = "crm", Description = "Get pre visitors", UniqueName = "bizgaze_transact_visitors_Getprevisitors", MethodName = "Getprevisitors", ModuleName = "visitors", PackageName = "bizgaze", ParamName1 = "code")]
25
         [SelectMethod(ApiName = "Get  pre visitors", AppName = "crm", Description = "Get pre visitors", UniqueName = "bizgaze_transact_visitors_Getprevisitors", MethodName = "Getprevisitors", ModuleName = "visitors", PackageName = "bizgaze", ParamName1 = "code")]
17
         public async Task<SelectResponse<Bizgaze.CRM.Visitors.Infos.Visitor>> GetpreVisitorsAsync(SelectRequest srequest, string code)
26
         public async Task<SelectResponse<Bizgaze.CRM.Visitors.Infos.Visitor>> GetpreVisitorsAsync(SelectRequest srequest, string code)
18
         {
27
         {
39
 
48
 
40
         }
49
         }
41
 
50
 
51
+        /// <summary>
52
+        /// This method that retrieves visitor information based on the provided code.It queries the CRM system to find visitor data associated with the specified code.
53
+        /// </summary>
54
+        /// <param name="srequest">The srequest parameter is used to filter the query</param>
55
+        /// <param name="code">represents the code associated with the pre-visitor for which information is being retrieved</param>
56
+        /// <returns>This method returns a response containing visitor information in JSON format.
57
+        /// If the visitor's RefStatusId is equal to 2, indicating that the visitor is already checked out, it returns an error response with status code "417" and the message "you have been already checked out".
58
+        /// If the visitor's RefStatusId is equal to 3, indicating that the visitor needs to check-in first, it returns an error response with status code "417" and the message "please Check-In First".
59
+        /// If the visitor's RefStatusId does not indicate any issues, it retrieves additional visitor information from the database, serializes it to JSON format, and returns it as part of the response.
60
+        /// </returns>
42
         [SelectMethod(ApiName = "Get  pre visitors id", AppName = "crm", Description = "Get pre visitors id", UniqueName = "bizgaze_transact_visitors_Getprevisitorsid", MethodName = "getprevisitorid", ModuleName = "visitors", PackageName = "bizgaze", ParamName1 = "code")]
61
         [SelectMethod(ApiName = "Get  pre visitors id", AppName = "crm", Description = "Get pre visitors id", UniqueName = "bizgaze_transact_visitors_Getprevisitorsid", MethodName = "getprevisitorid", ModuleName = "visitors", PackageName = "bizgaze", ParamName1 = "code")]
43
         public async Task<SelectResponse> GetVisitorsIDAsync(SelectRequest srequest, string code)
62
         public async Task<SelectResponse> GetVisitorsIDAsync(SelectRequest srequest, string code)
44
         {
63
         {
65
             return new SelectResponse() { Result = json };
84
             return new SelectResponse() { Result = json };
66
         }
85
         }
67
 
86
 
87
+        /// <summary>
88
+        /// This method that retrieves visitor information based on the provided VisitorId.
89
+        /// </summary>
90
+        /// <param name="request">This parameter of type SelectRequest represents the request object used for querying the database</param>
91
+        /// <param name="VisitorId">This parameter represents the VisitorId of the visitor for which information is being retrieved.</param>
92
+        /// <returns>This method returns a response containing visitor information, represented by an object of type Infos.Visitor. The response include a single visitor object matching the provided VisitorId or null if no visitor is found.</returns>
93
+        
68
         #region Getting data By VisitorId
94
         #region Getting data By VisitorId
69
         // This method gets a visitor record with the given VisitorId. It takes a SelectRequest as parameter and returns a SelectResponse<Infos.Visitor> object.
95
         // This method gets a visitor record with the given VisitorId. It takes a SelectRequest as parameter and returns a SelectResponse<Infos.Visitor> object.
70
         public async Task<SelectResponse<Infos.Visitor>> GetVisitorByIdAsync(SelectRequest request, long VisitorId)
96
         public async Task<SelectResponse<Infos.Visitor>> GetVisitorByIdAsync(SelectRequest request, long VisitorId)
76
             return data;
102
             return data;
77
         }
103
         }
78
         #endregion
104
         #endregion
105
+        /// <summary>
106
+        /// This method that retrieves detailed visitor data based on the provided VisitorId.visitor information associated with the specified ID, including details such as fullname, code, check-in datetime, cityname, contactname, purposeofvisit, and photourl.
107
+        /// </summary>
108
+        /// <param name="request">This parameter of type SelectRequest represents the request object used for querying the database</param>
109
+        /// <param name="VisitorId">represents the VisitorId of the visitor for which detailed information is being retrieved.</param>
110
+        /// <returns>This method returns a response containing detailed visitor information in JSON format.
111
+        /// The detailed information includes visitor's fullname, code, check-in datetime, cityname, contactname, purposeofvisit type, and photourl.
112
+        /// f the visitor is not found based on the provided VisitorId, the method returns an empty response.
113
+        /// If the visitor is found, the detailed information is serialized to JSON format and returned as part of the response</returns>
79
         #region Getting data By VisitorId
114
         #region Getting data By VisitorId
80
         public async Task<SelectResponse> GetVisitordataByIdAsync(SelectRequest request, long VisitorId)
115
         public async Task<SelectResponse> GetVisitordataByIdAsync(SelectRequest request, long VisitorId)
81
         {
116
         {
95
             return new SelectResponse() { Result = json };
130
             return new SelectResponse() { Result = json };
96
         }
131
         }
97
         #endregion
132
         #endregion
98
-
133
+        /// <summary>
134
+        /// This method is used to get the html of a visitor. It takes a Visitor ID as an argument, then gets the related templates from Unibase.Platform.Templates.Managers.ITemplateManager, if the templates are found the id is assigned to the variable "templateid" and the information from GetVisitorByIdAsync is used to populate the fields in the template. In the end, the PrintTemplate object is returned with the PrintHTML.
135
+        /// </summary>
136
+        /// <param name="srequest">The srequest parameter is used to filter the query</param>
137
+        /// <param name="VisitorId">This parameter represents the VisitorId of the visitor for which HTML content is being generated</param>
138
+        /// <returns>This method returns a response containing HTML content for printing visitor information.
139
+        /// If the visitor data is successfully retrieved and the template is found, the method replaces placeholders in the template with the corresponding visitor information and returns the HTML content as part of the response
140
+        /// If the visitor data is not found, it returns an error response with status code "1" and the message "visitor Not Found".
141
+        /// If the template is not found, it returns an error response with status code "1" and the message "Template Not Found".</returns>
99
         #region Get Visitors html
142
         #region Get Visitors html
100
         //This method is used to get the html of a visitor. It takes a Visitor ID as an argument, then gets the related templates from Unibase.Platform.Templates.Managers.ITemplateManager, if the templates are found the id is assigned to the variable "templateid" and the information from GetVisitorByIdAsync is used to populate the fields in the template. In the end, the PrintTemplate object is returned with the PrintHTML.
143
         //This method is used to get the html of a visitor. It takes a Visitor ID as an argument, then gets the related templates from Unibase.Platform.Templates.Managers.ITemplateManager, if the templates are found the id is assigned to the variable "templateid" and the information from GetVisitorByIdAsync is used to populate the fields in the template. In the end, the PrintTemplate object is returned with the PrintHTML.
101
         [SelectMethod(ApiName = "Get visitors Html", AppName = "crm", Description = "Get visitors Html", UniqueName = "bizgaze_transact_visitors_GetvisitorsHtml", MethodName = "getvisitorshtml", ModuleName = "visitors", PackageName = "bizgaze", ParamName1 = "visitorid")]
144
         [SelectMethod(ApiName = "Get visitors Html", AppName = "crm", Description = "Get visitors Html", UniqueName = "bizgaze_transact_visitors_GetvisitorsHtml", MethodName = "getvisitorshtml", ModuleName = "visitors", PackageName = "bizgaze", ParamName1 = "visitorid")]
189
          /***/
232
          /***/
190
 
233
 
191
 
234
 
192
-
235
+        /// <summary>
236
+        /// This action method is used to update the agreement status of the visitors in the bizgazecrm_visitors table.
237
+        /// </summary>
238
+        /// <param name="arequest">This parameter of type ActionRequest represents the request object used for updating the agreement status</param>
239
+        /// <param name="VisitorId">The VisitorId of the visitor whose status is to be updated. </param>
240
+        /// <returns>Returns success or error response based on the success of the query. </returns>
193
 
241
 
194
         #region Visitor Agreement
242
         #region Visitor Agreement
195
         /* 
243
         /* 
222
         #endregion
270
         #endregion
223
 
271
 
224
         #region check Mobile Number
272
         #region check Mobile Number
225
-        /** 
273
+        /// <summary>
274
+        /// This method is used to check the existing mobile number and email id in the Visitors table and if exists same mobile number or email return an error response.
275
+        /// </summary>
276
+        /// <param name="arequest">This parameter of type ActionRequest represents the request object used for checking the mobile number and emailID.</param>
277
+        /// <param name="mobileNumber">represents the mobile number to be checked</param>
278
+        /// <param name="emailId"> represents the email ID to be checked</param>
279
+        /// <returns>This method returns a response indicating the outcome of the mobile number and email ID check.</returns>
280
+        /* 
226
         * Api Name: check Mobile Number 
281
         * Api Name: check Mobile Number 
227
         * App Name: crm 
282
         * App Name: crm 
228
         * Description: check Mobile Numbert 
283
         * Description: check Mobile Numbert 
248
         }
303
         }
249
 
304
 
250
         #endregion
305
         #endregion
251
-
306
+        /// <summary>
307
+        /// this method retrieves visitor information based on a provided mobile number from the database.
308
+        /// </summary>
309
+        /// <param name="srequest">This parameter of type SelectRequest represents the request object used for retrieving visitor information</param>
310
+        /// <param name="MobileNumber">the mobilenumber for which visitor information is to be retrieved.</param>
311
+        /// <returns>This method returns the response contains visitor information based on the provided mobile number.</returns>
252
         #region  Getting data from Visitors by Mobile Number
312
         #region  Getting data from Visitors by Mobile Number
253
-        /** 
313
+        /* 
254
          * Get a single visitor record by mobile number 
314
          * Get a single visitor record by mobile number 
255
          * @param SelectRequest srequest - the filer criteria 
315
          * @param SelectRequest srequest - the filer criteria 
256
          * @param string MobileNumber - the mobile number of the visitor that needs to be retrieved 
316
          * @param string MobileNumber - the mobile number of the visitor that needs to be retrieved 
268
             return await GetSingleAsync<Bizgaze.CRM.Visitors.Infos.Visitor>(srequest);
328
             return await GetSingleAsync<Bizgaze.CRM.Visitors.Infos.Visitor>(srequest);
269
         }
329
         }
270
         #endregion
330
         #endregion
271
-
331
+        /// <summary>
332
+        /// This method is used to get the install app id based on the visitorid.
333
+        /// </summary>
334
+        /// <param name="srequest">This parameter of type SelectRequest represents the request object used for retrieving visitor information.</param>
335
+        /// <param name="VisitorId">represents the VisitorId of the visitor for which information is to be retrieved.</param>
336
+        /// <returns>The method returns visitor information based on the provided visitor ID</returns>
272
         #region  Get installedAppId Async
337
         #region  Get installedAppId Async
273
         /*  
338
         /*  
274
          This method is used to get the install app id based on the visitorid.  
339
          This method is used to get the install app id based on the visitorid.  
284
             return await GetSingleAsync<Bizgaze.CRM.Visitors.Infos.Visitor>(srequest);
349
             return await GetSingleAsync<Bizgaze.CRM.Visitors.Infos.Visitor>(srequest);
285
         }
350
         }
286
         #endregion
351
         #endregion
287
-
352
+        /// <summary>
353
+        /// Gets Visitors information with the given Visitor Id
354
+        /// </summary>
355
+        /// <param name="srequest">represents the request object used for retrieving visitor information.</param>
356
+        /// <param name="VisitorId">the unique identifier of the visitor for which information is to be retrieved.</param>
357
+        /// <returns>This method returns the response containing visitor information.The response contains visitor information based on the provided visitor ID.</returns>
288
         #region Get Visitor INformation
358
         #region Get Visitor INformation
289
         // Gets Visitors information with the given Visitor Id.
359
         // Gets Visitors information with the given Visitor Id.
290
         public async Task<SelectResponse<Bizgaze.CRM.Visitors.Infos.Visitor>> GetVisitorsAsync(SelectRequest srequest, long VisitorId)
360
         public async Task<SelectResponse<Bizgaze.CRM.Visitors.Infos.Visitor>> GetVisitorsAsync(SelectRequest srequest, long VisitorId)
296
         }
366
         }
297
 
367
 
298
         #endregion
368
         #endregion
299
-
369
+        /// <summary>
370
+        /// This method is used for capturing the image of the visitor.
371
+        /// </summary>
372
+        /// <param name="request">the request object containing information related to the action being performed</param>
373
+        /// <param name="obj">object containing dynamic properties representing the data to be saved. It likely contains the visitorid and the image</param>
374
+        /// <returns>This method returns If the image is successfully saved for the visitor, the method returns a success response with the message "Your Image Saved Successfully"
375
+        /// If there is an error during the image saving process, the method returns an error response.</returns>
300
         #region Save Visitor Image
376
         #region Save Visitor Image
301
         /* 
377
         /* 
302
          *  ActionMethod Name: SaveVisitorImage 
378
          *  ActionMethod Name: SaveVisitorImage 

Loading…
İptal
Kaydet