예제 #1
0
        public List<AgentOrderEntity> GetAgentOrders(string searchagentid, EnumOrderStageStatus status, EnumSendStatus sendstatus, EnumReturnStatus returnstatus, string keywords, string begintime, string endtime, int pageSize, int pageIndex, ref int totalCount, ref int pageCount, string agentid, string clientid)
        {
            DataSet ds = AgentOrderDAL.BaseProvider.GetAgentOrders(searchagentid, (int)status, (int)sendstatus, (int)returnstatus, keywords, begintime, endtime, pageSize, pageIndex, ref totalCount, ref pageCount, agentid, clientid);

            List<AgentOrderEntity> list = new List<AgentOrderEntity>();
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                AgentOrderEntity model = new AgentOrderEntity();
                model.FillData(dr);

                model.StatusStr = CommonBusiness.GetEnumDesc((EnumOrderStageStatus)model.Status);

                model.SendStatusStr = CommonBusiness.GetEnumDesc((EnumSendStatus)model.SendStatus);

                model.ExpressTypeStr = CommonBusiness.GetEnumDesc((EnumExpressType)model.ExpressType);

                if(!string.IsNullOrEmpty(model.ExpressID))
                {
                    model.ExpressCompany = Manage.ExpressCompanyBusiness.GetExpressCompanyDetail(model.ExpressID);
                }

                model.City = CommonBusiness.GetCityByCode(model.CityCode);
                if (model.City != null) 
                {
                    model.Address = model.City.Province + model.City.City + model.City.Counties + model.Address;
                }

                list.Add(model);
            }
            return list;
        }
예제 #2
0
        public List <AgentOrderEntity> GetAgentOrders(string searchagentid, EnumOrderStatus status, EnumSendStatus sendstatus, EnumReturnStatus returnstatus, string keywords, string begintime, string endtime, int pageSize, int pageIndex, ref int totalCount, ref int pageCount, string agentid, string clientid)
        {
            DataSet ds = AgentOrderDAL.BaseProvider.GetAgentOrders(searchagentid, (int)status, (int)sendstatus, (int)returnstatus, keywords, begintime, endtime, pageSize, pageIndex, ref totalCount, ref pageCount, agentid, clientid);

            List <AgentOrderEntity> list = new List <AgentOrderEntity>();

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                AgentOrderEntity model = new AgentOrderEntity();
                model.FillData(dr);

                model.StatusStr = CommonBusiness.GetEnumDesc((EnumOrderStatus)model.Status);

                model.SendStatusStr = CommonBusiness.GetEnumDesc((EnumSendStatus)model.SendStatus);

                model.ExpressTypeStr = CommonBusiness.GetEnumDesc((EnumExpressType)model.ExpressType);

                if (!string.IsNullOrEmpty(model.ExpressID))
                {
                    model.ExpressCompany = Manage.ExpressCompanyBusiness.GetExpressCompanyDetail(model.ExpressID);
                }

                model.City = CommonBusiness.GetCityByCode(model.CityCode);
                if (model.City != null)
                {
                    model.Address = model.City.Province + model.City.City + model.City.Counties + model.Address;
                }

                list.Add(model);
            }
            return(list);
        }