|
@@ -69,9 +69,8 @@ namespace Bizgaze.CRM.Visitors.ActionProviders
|
69
|
69
|
var visitorManager = Unibase.Dependency.DependencyConfig.Resolve<Bizgaze.CRM.Visitors.Managers.IVisitorManager>();
|
70
|
70
|
var dictObj = obj as IDictionary<string, dynamic>;
|
71
|
71
|
var MobileNumber = dictObj["mobilenumber"].ToString();
|
72
|
|
- var employeeId = Convert.ChangeType(dictObj["employeeid"].ToString(),typeof(long));
|
73
|
|
- var cityId= Convert.ChangeType(dictObj["cityid"].ToString(), typeof(long));
|
74
|
|
- //var visitorid= Convert.ChangeType(dictObj["visitorid"].ToString(), typeof(long));
|
|
72
|
+ var employeeId = Convert.ChangeType(dictObj["employeeid"].ToString(), typeof(long));
|
|
73
|
+ var cityId = Convert.ChangeType(dictObj["cityid"].ToString(), typeof(long));
|
75
|
74
|
var purposeofvisit = Convert.ChangeType(dictObj["purposeofvisit"].ToString(), typeof(long));
|
76
|
75
|
long visitorid = 0;
|
77
|
76
|
var visitorsinfo = await visitorManager.VisitorsbyMobileNumberAsync(srequest, MobileNumber);
|
|
@@ -115,7 +114,7 @@ namespace Bizgaze.CRM.Visitors.ActionProviders
|
115
|
114
|
Id = 0,
|
116
|
115
|
};
|
117
|
116
|
|
118
|
|
- dynamic visitor = new Dictionary<string, object>();
|
|
117
|
+ dynamic visitor = new Dictionary<string, object>();
|
119
|
118
|
visitor.Add("createdby", srequest.Identity.UserId);
|
120
|
119
|
visitor.Add("createddate", DateTime.Now);
|
121
|
120
|
visitor.Add("statusid", visitorsinfo.Result.StatusId);
|
|
@@ -132,7 +131,7 @@ namespace Bizgaze.CRM.Visitors.ActionProviders
|
132
|
131
|
visitor.Add("installedappid", visitorsinfo.Result.Installedappid);
|
133
|
132
|
visitor.Add("fullname", visitorsinfo.Result.FullName);
|
134
|
133
|
visitor.Add("futureinvitation", visitorsinfo.Result.FutureInvitation);
|
135
|
|
- visitor.Add("cityid",cityId);
|
|
134
|
+ visitor.Add("cityid", cityId);
|
136
|
135
|
visitor.Add("purposeofvisit", purposeofvisit);
|
137
|
136
|
visitor.Add("title", visitorsinfo.Result.Title);
|
138
|
137
|
visitor.Add("visitortype", visitorsinfo.Result.VisitorType);
|
|
@@ -143,7 +142,7 @@ namespace Bizgaze.CRM.Visitors.ActionProviders
|
143
|
142
|
return ActionResponse<FormActionResponse>.CreateErrorResponse("1", "Visitor Check Out Data Not Saved");
|
144
|
143
|
}
|
145
|
144
|
|
146
|
|
- //var _visitorId = Convert.ToInt64(response.Result["_Id"].ToString());
|
|
145
|
+ var _visitorId = Convert.ToInt64(response.Result["_Id"].ToString());
|
147
|
146
|
var vistoroptions1 = new EntityOptions()
|
148
|
147
|
{
|
149
|
148
|
IsIdentity = true,
|
|
@@ -155,7 +154,7 @@ namespace Bizgaze.CRM.Visitors.ActionProviders
|
155
|
154
|
};
|
156
|
155
|
dynamic visitor1 = new Dictionary<string, object>();
|
157
|
156
|
visitor1.Add("createdby", srequest.Identity.UserId);
|
158
|
|
- visitor1.Add("visitorid", visitorid);
|
|
157
|
+ visitor1.Add("visitorid", _visitorId);
|
159
|
158
|
visitor1.Add("checkindate", DateTime.Now);
|
160
|
159
|
visitor1.Add("tenantid", visitorsinfo.Result.TenantId);
|
161
|
160
|
visitor1.Add("comments", "");
|
|
@@ -179,17 +178,17 @@ namespace Bizgaze.CRM.Visitors.ActionProviders
|
179
|
178
|
var NewStageId = stage.Result.StageId;
|
180
|
179
|
DateTime date = DateTime.Now;
|
181
|
180
|
var updateDate = new Dictionary<string, object>();
|
182
|
|
- //updateDate.Add("employeeid", employeeId);
|
183
|
|
- updateDate.Add("cityid", cityId);
|
184
|
|
- updateDate.Add("typeofvisitor", 1);
|
185
|
|
- updateDate.Add("stageid", NewStageId);
|
186
|
|
- updateDate.Add("checkindate", date);
|
187
|
|
- updateDate.Add("lastupdateddate", date);
|
188
|
|
- //updateDate.Add("purposeofvisit", purposeofvisit);
|
189
|
|
- var updateQry = new Update("bizgazecrm_visitors").Values(updateDate).Where(Exp.Eq("visitorid", visitorid));
|
190
|
|
- var ds = await _repository.ExecuteAsync(request, updateQry);
|
191
|
|
- // var UpdateStage = new Update("bizgazecrm_visitors").Value("stageid", NewStageId).Value("lastupdateddate", date).Where(Exp.Eq("code", code));
|
192
|
|
- //await _repository.ExecuteAsync(request, UpdateStage);
|
|
181
|
+ // //updateDate.Add("employeeid", employeeId);
|
|
182
|
+ // //updateDate.Add("cityid", cityId);
|
|
183
|
+ //// updateDate.Add("typeofvisitor", 1);
|
|
184
|
+ // updateDate.Add("stageid", NewStageId);
|
|
185
|
+ // updateDate.Add("checkindate", date);
|
|
186
|
+ // updateDate.Add("lastupdateddate", date);
|
|
187
|
+ //// updateDate.Add("purposeofvisit", purposeofvisit);
|
|
188
|
+ // var updateQry = new Update("bizgazecrm_visitors").Values(updateDate).Where(Exp.Eq("visitorid", visitorid));
|
|
189
|
+ // var ds = await _repository.ExecuteAsync(request, updateQry);
|
|
190
|
+ var UpdateStage = new Update("bizgazecrm_visitors").Value("stageid", NewStageId).Value("lastupdateddate", date).Where(Exp.Eq("code", code));
|
|
191
|
+ await _repository.ExecuteAsync(request, UpdateStage);
|
193
|
192
|
}
|
194
|
193
|
else
|
195
|
194
|
{
|