예제 #1
0
        public async Task <ProductTemplatesGetRes> GetProductTemplates(ProductTemplatesGetReq request, string ticket)
        {
            ProductTemplatesGetRes ProductTemplatesGetRes = new ProductTemplatesGetRes();

            ProductTemplatesGetRes = await serviceProxy.PostData(_configuration.GetValue <string>("ServiceMaster:GetProductTemplates"), request, typeof(ProductTemplatesGetRes), ticket);

            return(ProductTemplatesGetRes);
        }
예제 #2
0
 public List <mProductTemplates> GetProductTemplates(ProductTemplatesGetReq request)
 {
     if (string.IsNullOrEmpty(request?.VoyagerProductTemplate_Id))
     {
         return(_MongoContext.mProductTemplates.AsQueryable().ToList());
     }
     else
     {
         return(_MongoContext.mProductTemplates.AsQueryable().Where(a => a.VoyagerProductTemplate_Id == request.VoyagerProductTemplate_Id).ToList());
     }
 }
예제 #3
0
        public ProductTemplatesGetRes GetProductTemplates(ProductTemplatesGetReq request)
        {
            var response = new ProductTemplatesGetRes();

            try
            {
                response.ProductTemplates      = _MasterRepository.GetProductTemplates(request);
                response.ResponseStatus.Status = "Success";
            }
            catch (Exception ex)
            {
                response.ResponseStatus.Status       = "Failure";
                response.ResponseStatus.ErrorMessage = "An Error Occurs :- " + ex.Message;
            }
            return(response);
        }