public void getDC(HttpContext context) { List <Common.Entity.DealerContact> dealerContactResult = new List <Common.Entity.DealerContact>(); List <Common.Entity.OrderDealerContact> orderContactResult = new List <Common.Entity.OrderDealerContact>(); BLL.DealerContact dealerContact = new BLL.DealerContact(); string DealerId = context.Request["DealerId"]; string orderId = context.Request["orderId"]; string IsEdit = context.Request["IsEdit"]; if (!string.IsNullOrEmpty(DealerId)) { if ("1" == IsEdit) { dealerContactResult = dealerContact.GetListByDealerID(DealerId); var model = new CommonFunction.DataResult <Common.Entity.DealerContact> { dataList = dealerContactResult }; context.Response.Write(JsonConvert.SerializeObject(model)); } } else { orderContactResult = dealerContact.GetListByOrdersID(orderId); var model = new CommonFunction.DataResult <Common.Entity.OrderDealerContact> { dataList = orderContactResult }; context.Response.Write(JsonConvert.SerializeObject(model)); } }
/// <summary> /// 从服务器端获取经销店库存上报分页列表 /// </summary> /// <param name="context"></param> public void GetDealerStockPagerList(HttpContext context) { string username = context.User.Identity.Name; Common.SysUserEntity model = new BLL.sysUser().GetSysUserByLoginName(username); int DealerId = model.DealerId; int totalCount = 0; // 总记录数 int pageIndex = Convert.ToInt32(context.Request["page"]); // 当前页 int pageSize = Convert.ToInt32(context.Request["rows"]); // 页码大小 Common.Entity.DealerStock search = new Common.Entity.DealerStock(); if (!string.IsNullOrEmpty(context.Request.Form["filterContext"])) { search = JsonConvert.DeserializeObject <Common.Entity.DealerStock>(context.Request.Form["filterContext"]); } var list = new BLL.DealerStock().GetDealerStockPagerList(pageIndex, pageSize, DealerId, search, out totalCount); int totalPages = CommonFunction.CalculateTotalPage(pageSize, totalCount); var ResultData = new CommonFunction.DataResult <Common.Entity.DealerStock>() { totalCount = totalCount, totalpages = totalPages, currPage = pageIndex, dataList = list, }; context.Response.Write(JsonConvert.SerializeObject(ResultData)); }
/// <summary> /// 根据客户ID查询客户联系人信息 /// </summary> /// <param name="context">上下文对象</param> public void GetCustomerContactsPager(HttpContext context) { try { List <Common.Entity.CustomerContact> resultBuy = new List <Common.Entity.CustomerContact>(); string customerId = context.Request["customerId"]; if (string.IsNullOrEmpty(customerId)) { var model = new CommonFunction.DataResult <Common.Entity.CustomerContact>() { dataList = resultBuy, }; context.Response.Write(JsonConvert.SerializeObject(model)); } else { resultBuy = new BLL.Customer().GetCustomerContactsPager(customerId); var model = new CommonFunction.DataResult <Common.Entity.CustomerContact>() { dataList = resultBuy, }; context.Response.Write(JsonConvert.SerializeObject(model)); } } catch (Exception ex) { throw ex; } }
public void getCC(HttpContext context) { List <Common.Entity.CustomerContact> customerContactResult = new List <Common.Entity.CustomerContact>(); List <Common.Entity.OrderCustomerContact> orderCustomerContactResult = new List <Common.Entity.OrderCustomerContact>(); BLL.Customer bll = new BLL.Customer(); string customerId = context.Request["customerId"]; string orderId = context.Request["orderId"]; string IsEdit = context.Request["IsEdit"]; if (string.IsNullOrEmpty(customerId)) { var model = new CommonFunction.DataResult <Common.Entity.CustomerContact> { dataList = customerContactResult }; context.Response.Write(JsonConvert.SerializeObject(model)); } else { if ("1" == IsEdit) { customerContactResult = bll.GetListByCustomerID(customerId); var model = new CommonFunction.DataResult <Common.Entity.CustomerContact> { dataList = customerContactResult }; context.Response.Write(JsonConvert.SerializeObject(model)); } else { orderCustomerContactResult = bll.GetListByOrdersID(orderId); var model = new CommonFunction.DataResult <Common.Entity.OrderCustomerContact> { dataList = orderCustomerContactResult }; context.Response.Write(JsonConvert.SerializeObject(model)); } } }
/// <summary> /// 获取审核信息 /// </summary> /// <param name="context"></param> public void GetPayCarDetail(HttpContext context) { string orderId = context.Request["orderId"]; List <Common.Entity.CarRecord> resultBuy = new List <Common.Entity.CarRecord>(); if (string.IsNullOrEmpty(orderId)) { var model = new CommonFunction.DataResult <Common.Entity.CarRecord>() { dataList = resultBuy, }; context.Response.Write(JsonConvert.SerializeObject(model)); } else { resultBuy = new BLL.CarRecord().GetList(orderId); var model = new CommonFunction.DataResult <Common.Entity.CarRecord>() { dataList = resultBuy, }; context.Response.Write(JsonConvert.SerializeObject(model)); } }
/// <summary> /// 获取全部订单信息 /// </summary> /// <param name="context">上下文对象</param> public void GetOrdersAllPager(HttpContext context) { int totalCount = 0; // 总记录数 int pageIndex = Convert.ToInt32(context.Request["page"]); // 当前页 int pageSize = Convert.ToInt32(context.Request["rows"]); // 页码大小 Common.Entity.Order filter = new Common.Entity.Order(); if (!string.IsNullOrEmpty(context.Request.Form["OrdersearchContext"])) { filter = JsonConvert.DeserializeObject <Common.Entity.Order>(context.Request.Form["OrdersearchContext"]); } var list = new BLL.Order().GetOrdersAllPager(pageIndex, pageSize, filter, out totalCount); int totalPages = CommonFunction.CalculateTotalPage(pageSize, totalCount); var ResultData = new CommonFunction.DataResult <Common.Entity.Order>() { totalCount = totalCount, totalpages = totalPages, currPage = pageIndex, dataList = list, }; context.Response.Write(JsonConvert.SerializeObject(ResultData)); }