コード例 #1
0
        public GetUpdateCountResponseList GetUpdateObjectList(GetUpdateCountRequestList requestList)
        {
            GetUpdateCountResponseList responseList = new GetUpdateCountResponseList();
            responseList.List = new List<GetUpdateCountResponse>();

            if (requestList != null && requestList.List != null)
            {
                foreach (GetUpdateCountRequest req in requestList.List)
                {
                    GetUpdateCountResponse response = new GetUpdateCountResponse();
                    switch (req.TypeName)
                    {
                        case "Vehicle": response = GetVehicleUpdateCount(req); break;
                        default:
                            break;
                    }
                    if (response != null && response.Count > 0)
                    {
                        responseList.List.Add(new GetUpdateCountResponse(req.TypeName, response.Count, req.Priority));
                    }
                }
            }

            return responseList;
        }
コード例 #2
0
ファイル: AccessLog.cs プロジェクト: ashish-antil/Products
 public GetUpdateCountResponse GetAccessLogUpdateCount(GetUpdateCountRequest request)
 {
     GetUpdateCountResponse response = new GetUpdateCountResponse();
     try
     {
         response = GenericGetEntityUpdateCount<AccessLog>(request.TimeStamp, true, request.ID, request.LastRecordID);
     }
     catch (Exception ex)
     {
         return ErrorHandler.Handle<GetUpdateCountResponse>(ex);
     }
     return response;
 }
コード例 #3
0
        public GetUpdateCountResponse GetTaskParameterUpdateCount(GetUpdateCountRequest request)
        {
            GetUpdateCountResponse response = new GetUpdateCountResponse();

            try
            {
                response = GenericGetEntityUpdateCount<TaskParameter>("TaskParameter", request.TimeStamp, true, request.ID, request.LastRecordID);
            }
            catch (Exception ex)
            {
                return ErrorHandler.Handle<GetUpdateCountResponse>(ex);
            }

            return response;
        }
コード例 #4
0
ファイル: Profile.cs プロジェクト: ashish-antil/Products
 public GetUpdateCountResponse GetIACProfileCount(IDRequest request)
 {
     GetUpdateCountResponse response = new GetUpdateCountResponse();
     try
     {
         var db = ImardaDatabase.CreateDatabase(Util.GetConnName<Profile>());
         using (IDataReader dr = db.ExecuteDataReader("SPGetProfileCount", true, request.ID, 1))
         {
             if (dr.Read()) response.Count = Convert.ToInt32(dr[0]);
         }
     }
     catch (Exception ex)
     {
         return ErrorHandler.Handle<GetUpdateCountResponse>(ex);
     }
     return response;
 }
コード例 #5
0
 public GetUpdateCountResponse GetScopedCompanyCount(IDRequest request)
 {
     var response = new GetUpdateCountResponse();
     try
     {
         var scope = request["Scope"];
         if (string.IsNullOrEmpty(scope))
             scope = "0";
         try
         {
             var db = ImardaDatabase.CreateDatabase(Util.GetConnName<Company>());
             using (IDataReader dr = db.ExecuteDataReader("SPGetScopedCompanyCount", request.ID, scope))
             {
                 if (dr.Read()) response.Count = Convert.ToInt32(dr[0]);
             }
         }
         catch (Exception ex)
         {
             ErrorHandler.Handle<GetUpdateCountResponse>(ex);
         }
         return response;
     }
     catch (Exception ex)
     {
         return ErrorHandler.Handle<GetUpdateCountResponse>(ex);
     }
 }
コード例 #6
0
        public GetUpdateCountResponse GetCompanyLocationUpdateCount(GetUpdateCountRequest request)
        {
            GetUpdateCountResponse response = new GetUpdateCountResponse();

            try
            {
                response = GenericGetEntityUpdateCount<CompanyLocation>("CompanyLocation", request.TimeStamp, true, request.ID, request.LastRecordID);
                var service = ImardaProxyManager.Instance.IImardaCRMProxy;
                ChannelInvoker.Invoke(delegate(out IClientChannel channel)
                {

                    channel = service as IClientChannel;
                    response =  service.GetCompanyLocationUpdateCount(request);
                });
                return response;
            }
            catch (Exception ex)
            {
                return ErrorHandler.Handle<GetUpdateCountResponse>(ex);
            }
        }
コード例 #7
0
 public GetUpdateCountResponse GetNotificationItemUpdateCount(GetUpdateCountRequest request)
 {
     try
     {
         var response = new GetUpdateCountResponse();
         var service = ImardaProxyManager.Instance.IImardaCRMProxy;
         ChannelInvoker.Invoke(delegate(out IClientChannel channel)
         {
             channel = service as IClientChannel;
             response = service.GetNotificationItemUpdateCount(request);
         });
         return response;
     }
     catch (Exception ex)
     {
         return ErrorHandler.Handle<GetUpdateCountResponse>(ex);
     }
 }