Пример #1
0
 public HttpResponseMessage CompleteRenewalTask(Int64 merchantId, Int64 contractId)
 {
     using (MerchantTier mt = new MerchantTier())
     {
         var mo = mt.RetrieveMerchantOffer(merchantId, contractId);
         return this.Request.CreateResponse(HttpStatusCode.OK, mo);
     }
 }
Пример #2
0
 public HttpResponseMessage CompleteRenewalTask(Int64 contractId)
 {
     using (MerchantTier mt = new MerchantTier())
     {
         mt.CompleteRenewalsTask(contractId);
         return this.Request.CreateResponse(HttpStatusCode.OK);
     }
 }
Пример #3
0
 public HttpResponseMessage ManageCreditCardProfiles(Int64 merchantid, [FromBody] IList<Bridge.Models.MerchantProfile> profiles, int iscompleted, Int64 contractId)
 {
     int response = 0;
     using (MerchantTier mt = new MerchantTier())
     {
         response = mt.ManageCreditCardProfile(merchantid, profiles, iscompleted, contractId);
         if (response != 0)
             return Request.CreateResponse(HttpStatusCode.OK);
         else
             return Request.CreateResponse(HttpStatusCode.BadRequest);
     }
 }
Пример #4
0
 public HttpResponseMessage Remove(int merchantId)
 {
     using (MerchantTier mt = new MerchantTier())
     {
         if (mt.Remove(merchantId))
         {
             return this.Request.CreateResponse(HttpStatusCode.OK);
         }
         else
         {
             return this.Request.CreateResponse(HttpStatusCode.BadRequest);
         }
     }
 }
Пример #5
0
 public HttpResponseMessage Create([FromBody] MerchantsModel model)
 {
     using (MerchantTier mt = new MerchantTier())
     {
         if (mt.Create(model))
         {
             return this.Request.CreateResponse(HttpStatusCode.OK);
         }
         else
         {
             return this.Request.CreateResponse(HttpStatusCode.BadRequest);
         }
     }
 }
Пример #6
0
        public HttpResponseMessage SendRequesttoProcessor(Int64 merchantid, Int64 processorId)
        {
            using (MerchantTier mt = new MerchantTier())
            {

                if (mt.SendRequesttoProcessor(merchantid, processorId))
                    return Request.CreateResponse(HttpStatusCode.OK);
                else
                    return Request.CreateResponse(HttpStatusCode.BadRequest);
            }
        }
Пример #7
0
 public HttpResponseMessage SaveDE([FromBody] MerchantDEModel model, Int64 merchantId, string isCompleted = null)
 {
     using (MerchantTier mt = new MerchantTier())
     {
         if (mt.SaveDE(model, merchantId, isCompleted))
         {
             return this.Request.CreateResponse(HttpStatusCode.OK);
         }
         else
         {
             return this.Request.CreateResponse(HttpStatusCode.BadRequest);
         }
     }
 }
Пример #8
0
        public HttpResponseMessage Save([FromBody] MerchantTempModel model, Int64 merchantid = 0, string isCompleted = null)
        {
            Int64 _merchantId = 0;
            using (MerchantTier mt = new MerchantTier())
            {
                _merchantId = mt.Save(model, merchantid, isCompleted);
                return this.Request.CreateResponse(HttpStatusCode.OK, new { merchantid = _merchantId });

            }
        }
Пример #9
0
 public HttpResponseMessage RetriveQueue()
 {
     IList<MerchantTempModel> response;
     using (MerchantTier mt = new MerchantTier())
     {
         response = mt.RetrieveQueue();
         return this.Request.CreateResponse(HttpStatusCode.OK, response);
     }
 }
Пример #10
0
 public HttpResponseMessage RetriveMerchants(Int64 merchantId)
 {
     MerchantsModel response;
     using (MerchantTier mt = new MerchantTier())
     {
         response = mt.RetrieveMerchants(merchantId);
         return this.Request.CreateResponse(HttpStatusCode.OK, response);
     }
 }
Пример #11
0
 public HttpResponseMessage RetriveMerchantsSearchResults(string businessName = "", string rnc = "", string legalName = "", string ownerName = "",
     Int64 merchantId = 0, Int64 contractId = 0,
     Int64 workflowId = 0, Int64 statusId = 0, Int64 processornbr = 0, string processorName = "", Int64 tasktype = 0, Int16 showTemp = 0, string SearchType = "", Int64 assignedUserId = 0)
 {
     IList<SearchResultsModel> response;
     using (MerchantTier mt = new MerchantTier())
     {
         response = mt.RetrieveMerchantsSeachResults(businessName, rnc, legalName, ownerName, merchantId, contractId,
      workflowId, statusId, processornbr, processorName, tasktype, showTemp, SearchType, assignedUserId);
         return this.Request.CreateResponse(HttpStatusCode.OK, response);
     }
 }
Пример #12
0
 public HttpResponseMessage RetriveMerchantsInfo(Int64 merchantId, Int64 tasktypeId = 0, Int64 contractId = 0)
 {
     MerchantsModel response;
     using (MerchantTier mt = new MerchantTier())
     {
         response = mt.RetrieveMerchantInfo(merchantId, tasktypeId, contractId);
         return this.Request.CreateResponse(HttpStatusCode.OK, response);
     }
 }
Пример #13
0
 public HttpResponseMessage RetriveMerchantsCompleteInfo(Int64 merchantId)
 {
     MerchantsAdditionalInfo response;
     using (MerchantTier mt = new MerchantTier())
     {
         response = mt.RetrieveMerchantDataEntry(merchantId);
         return this.Request.CreateResponse(HttpStatusCode.OK, response);
     }
 }
Пример #14
0
 public HttpResponseMessage RetriveMerchantSalesForce(string businessName = null, string legalName = null, string ownerName = null, string rnc = null)
 {
     IList<MerchantTempModel> response;
     using (MerchantTier mt = new MerchantTier())
     {
         response = mt.RetriveMerchantSalesForce(businessName, rnc, legalName, ownerName);
         return this.Request.CreateResponse(HttpStatusCode.OK, response);
     }
 }
Пример #15
0
 public HttpResponseMessage RetriveMerchants()
 {
     DataSet response;
     using (MerchantTier mt = new MerchantTier())
     {
         response = mt.RetrieveRenewalsList();
         if (response.Tables[0].Rows.Count > 0)
         {
             var str = response.Tables[0].Rows[0]["percentPaid"];
             var renewalList = response.Tables[0].AsEnumerable().Select(data => new
             {
                 merchantId = data.Field<Int64>("merchantId"),
                 legalName = data.Field<string>("legalName"),
                 taskName = data.Field<string>("taskName"),
                 taskstatus = data.Field<Int32>("statusId"),
                 merchantStatus = "",
                 loanamount = data.Field<double>("loanamount"),
                 ownedAmount = data.Field<double>("ownedAmount"),
                 paidamount = data.Field<double>("paidamount"),
                 // fundedDate = data.Field<DateTime>("fundedDate", DataRowVersion.Current),
                 paidpercent = 0D,
                 expectedturn = data.Field<Int64>("expectedTurn", DataRowVersion.Current),
                 actualturn = data.Field<Int64>("actualTurn", DataRowVersion.Current),
                 contractId = data.Field<Int64>("contractId")
             }).ToList();
             return this.Request.CreateResponse(HttpStatusCode.OK, renewalList);
         }
         else
         {
             return this.Request.CreateResponse(HttpStatusCode.OK);
         }
     }
 }
Пример #16
0
 public HttpResponseMessage RetriveMerchants(string businessName = null, string rnc = null, string legalName = null, string ownerName = null,
     Int64? merchantId = null, Int64? contractId = null,
     Int64? workflowId = null, Int64? statusId = null, Int64? processornbr = null, string processorName = null, Int64? tasktype = null)
 {
     IList<MerchantsModel> response;
     using (MerchantTier mt = new MerchantTier())
     {
         response = mt.RetrieveMerchants(businessName, rnc, legalName, ownerName, merchantId, contractId,
      workflowId, statusId, processornbr, processorName, tasktype);
         return this.Request.CreateResponse(HttpStatusCode.OK, response);
     }
 }
Пример #17
0
 public HttpResponseMessage RetriveOwner(Int64 merchantId)
 {
     IList<OwnerModel> response;
     using (MerchantTier owner = new MerchantTier())
     {
         response = owner.RetrieveOwner(merchantId);
         return this.Request.CreateResponse(HttpStatusCode.OK, response);
     }
 }
Пример #18
0
 public HttpResponseMessage RetriveProcessorbyMerchant(Int64 merchantId)
 {
     IList<ProcessorModel> response;
     using (MerchantTier profiles = new MerchantTier())
     {
         response = profiles.RetrieveProcessorbyMerchant(merchantId);
         return this.Request.CreateResponse(HttpStatusCode.OK, response);
     }
 }
Пример #19
0
 public HttpResponseMessage RetriveCreditCardProfiles(Int64 merchantId)
 {
     IList<Bridge.Models.MerchantProfile> response;
     using (MerchantTier profiles = new MerchantTier())
     {
         response = profiles.RetriveCreditCardProfiles(merchantId);
         return this.Request.CreateResponse(HttpStatusCode.OK, response);
     }
 }
Пример #20
0
 public HttpResponseMessage RetriveEmails(Int64 SalesRepId)
 {
     IList<EmailModel> response;
     using (MerchantTier mt = new MerchantTier())
     {
         response = mt.RetriveEmails(SalesRepId);
         return this.Request.CreateResponse(HttpStatusCode.OK, response);
     }
 }