Пример #1
0
        public JsonResult GetCustomerDataTable(System.String id)
        {
            DataTableViewModel data;

            GetCustomerDemographicRequest request = new GetCustomerDemographicRequest();

            request.CustomerTypeID = id;
            CustomerDemographicView customerDemographic = _customerDemographicService.GetCustomerDemographic(request).CustomerDemographic;

            data                 = new DataTableViewModel();
            data.draw            = "1";
            data.recordsTotal    = customerDemographic.Customers.ToList().Count.ToString();
            data.recordsFiltered = customerDemographic.Customers.ToList().Count.ToString();

            data.data = customerDemographic.Customers.ConvertToDetailCustomerDemographicCustomerDetailViews().ToList <object>();

            return(Json(data, JsonRequestBehavior.AllowGet));
        }
 public static CustomerDemographic ConvertToCustomerDemographic(
     this CustomerDemographicView customerDemographicView)
 {
     return(Mapper.Map <CustomerDemographicView,
                        CustomerDemographic>(customerDemographicView));
 }
 public static DetailCustomerDemographic_CustomerDemographicDetailView ConvertToDetailCustomerDemographic_CustomerDemographicDetailView(
     this CustomerDemographicView customerDemographics)
 {
     return(Mapper.Map <CustomerDemographicView,
                        DetailCustomerDemographic_CustomerDemographicDetailView>(customerDemographics));
 }
 public static ModifyCustomerDemographicRequest ConvertToModifyCustomerDemographicRequest(
     this CustomerDemographicView customerDemographics)
 {
     return(Mapper.Map <CustomerDemographicView,
                        ModifyCustomerDemographicRequest>(customerDemographics));
 }
 public static CustomerDemographicFlatViewModel ConvertToCustomerDemographicFlatViewModel(
     this CustomerDemographicView customerDemographic)
 {
     return(Mapper.Map <CustomerDemographicView,
                        CustomerDemographicFlatViewModel>(customerDemographic));
 }