예제 #1
0
        public ActionResult AddReceiveTransportPoint(int?synchroReceiveAddressId)
        {
            AddReceiveTransportPointModel model = new AddReceiveTransportPointModel();

            if (synchroReceiveAddressId.HasValue)//如果是通过同步收货地址打开的新增收货地址界面,那么会有通过接口过来的待同步地址ID
            {
                var result = MGJH_TransportPointBLL.GetSynchroReceivePointByID(synchroReceiveAddressId.Value);
                if (result.DataResult == null)
                {
                    return(Content(result.Message));
                }
                var tempModel = result.DataResult;
                model.AddressName  = tempModel.AddressName;
                model.CustomerName = tempModel.CustomerName;
                model.AddressArea  = tempModel.AddressArea;
                model.AddressCode  = tempModel.AddressCode;
                model.SourceID     = synchroReceiveAddressId;
            }

            //AddReceiveTransportPointModel model = new AddReceiveTransportPointModel();
            //在查询出的收货地址前面加上一条记录--表示无上级收货地址
            List <SuperiorAddressModel> superiorAddress = new List <SuperiorAddressModel>();

            superiorAddress.Add(new SuperiorAddressModel()
            {
                ID = -1, AddressName = @UIText.Noting
            });
            superiorAddress.AddRange(MGJH_TransportPointBLL.GetAddSuperiorAddress());
            model.SuperiorAddressSelectList = new SelectList(superiorAddress, "ID", "AddressName");
            return(PartialView("_AddReceiveTransportPoint", model));
        }
        public ActionResult DeletePickUpTransportPoint(FormCollection fc)
        {
            string[] ids    = fc["pid"].Split(',');
            var      result = MGJH_TransportPointBLL.DeletePickUpTransportPoint(ids);

            base.DoLog(OperationTypeEnum.Delete, result, fc["pid"]);
            return(Json(result));
        }
        public ActionResult GetPickUpTransportPoint(MGJH_PickUpTransportPointSearchModel model, int searchPage)
        {
            SearchDataWithPagedDatas <MGJH_PickUpTransportPointSearchModel, MGJH_PickUpTransportPointListModel> result = new SearchDataWithPagedDatas <MGJH_PickUpTransportPointSearchModel, MGJH_PickUpTransportPointListModel>();

            result.SearchModel = model;
            result.PagedDatas  = MGJH_TransportPointBLL.GetPagedPickUpTransportPoints(result.SearchModel, searchPage, this.PageSize);
            return(PartialView("_PickUpTransportPointPagedGrid", result));
        }
        //
        // GET: /Admin/MGJH_TransportPoint/

        #region  查询
        public ActionResult PickUpTransportPointSetting()
        {
            SearchDataWithPagedDatas <MGJH_PickUpTransportPointSearchModel, MGJH_PickUpTransportPointListModel> model = new SearchDataWithPagedDatas <MGJH_PickUpTransportPointSearchModel, MGJH_PickUpTransportPointListModel>();

            model.SearchModel = new MGJH_PickUpTransportPointSearchModel();
            model.PagedDatas  = MGJH_TransportPointBLL.GetPagedPickUpTransportPoints(model.SearchModel, 1, this.PageSize);
            return(PartialView("_PickUpTransportPointSetting", model));
        }
        public ActionResult EditPickUpTransportPoint(int id)
        {
            var result = MGJH_TransportPointBLL.GetPickUpTransportPointByID(id);

            if (result.DataResult == null)
            {
                return(Content(result.Message));
            }
            var model = result.DataResult;

            return(PartialView("_EditPickUpTransportPoint", model));
        }
 public ActionResult AddPickUpTransportPoint(AddPickUpTransportPointModel model)
 {
     if (ModelState.IsValid)
     {
         var result = MGJH_TransportPointBLL.AddPickUpTransportPoint(model, base.CurrentUserID);
         base.DoLog(OperationTypeEnum.Add, result, "PickUpAddressName:" + model.AddressName);
         return(Json(result));
     }
     else
     {
         return(PartialView("_AddPickUpTransportPoint", model));
     }
 }
 public ActionResult EditPickUpTransportPoint(EditPickUpTransportPointModel model)
 {
     if (ModelState.IsValid)
     {
         var result = MGJH_TransportPointBLL.EditPickUpTransportPoint(model, base.CurrentUserID);
         base.DoLog(OperationTypeEnum.Edit, result, "PickUpTransportID:" + model.ID);
         return(Json(result));
     }
     else
     {
         return(PartialView("_EditPickUpTransportPoint", model));
     }
 }
예제 #8
0
        public ActionResult GetElectricFenceByVehicleID(long vehicleID)
        {
            var list = ElectricFenceBLL.GetElectricFenceByVehicleID(vehicleID);

            if (list == null)
            {
                list = new List <ElectricFenceListModel>();
            }
            foreach (var item in list)
            {
                item.FenceTypeInfo = MGJH_TransportPointBLL.ChangeCoordinateSystem(item.FenceType, item.FenceTypeInfo, 2);  //将取出的车机坐标转成地图坐标显示
            }
            return(Json(list, JsonRequestBehavior.AllowGet));
        }
예제 #9
0
        public ActionResult GetEFMarkersInfo()
        {
            var list = ElectricFenceBLL.GetEFMarkersInfoBySID(base.CurrentStrucID);

            if (list == null)
            {
                list = new List <EFMarkerListModel>();
            }
            foreach (var item in list)
            {
                item.FenceTypeInfo = MGJH_TransportPointBLL.ChangeCoordinateSystem(item.FenceType, item.FenceTypeInfo, 2);  //将取出的车机坐标转成地图坐标显示
            }
            return(Json(list, JsonRequestBehavior.AllowGet));
        }
예제 #10
0
        public ActionResult EditReceiveTransportPoint(int id)
        {
            var result = MGJH_TransportPointBLL.GetReceiveTransportPointByID(id);

            if (result.DataResult == null)
            {
                return(Content(result.Message));
            }
            var model = result.DataResult;
            //在查询出的收货地址前面加上一条记录--表示无上级收货地址
            List <SuperiorAddressModel> superiorAddress = new List <SuperiorAddressModel>();

            superiorAddress.Add(new SuperiorAddressModel()
            {
                ID = -1, AddressName = @UIText.Noting
            });
            superiorAddress.AddRange(MGJH_TransportPointBLL.GetEditSuperiorAddress(id));
            model.SuperiorAddressSelectList = new SelectList(superiorAddress, "ID", "AddressName");
            return(PartialView("_EditReceiveTransportPoint", model));
        }
예제 #11
0
 public ActionResult EditReceiveTransportPoint(EditReceiveTransportPointModel model)
 {
     if (ModelState.IsValid)
     {
         var result = MGJH_TransportPointBLL.EditReceiveTransportPoint(model, base.CurrentUserID);
         base.DoLog(OperationTypeEnum.Edit, result, "ReceiveTransportID:" + model.ID);
         return(Json(result));
     }
     else
     {
         //在查询出的收货地址前面加上一条记录--表示无上级收货地址
         List <SuperiorAddressModel> superiorAddress = new List <SuperiorAddressModel>();
         superiorAddress.Add(new SuperiorAddressModel()
         {
             ID = -1, AddressName = @UIText.Noting
         });
         superiorAddress.AddRange(MGJH_TransportPointBLL.GetEditSuperiorAddress(model.ID));
         model.SuperiorAddressSelectList = new SelectList(superiorAddress, "ID", "AddressName");
         return(PartialView("_EditReceiveTransportPoint", model));
     }
 }
예제 #12
0
 public ActionResult AddReceiveTransportPoint(AddReceiveTransportPointModel model)
 {
     if (ModelState.IsValid)
     {
         var    result = MGJH_TransportPointBLL.AddReceiveTransportPoint(model, base.CurrentUserID);
         string temp   = string.Format("ReceiveTransportPointAddressName:{0} SourceID:{1}", model.AddressName, model.SourceID);
         base.DoLog(OperationTypeEnum.Add, result, temp);
         return(Json(result));
     }
     else
     {
         //在查询出的收货地址前面加上一条记录--表示无上级收货地址
         List <SuperiorAddressModel> superiorAddress = new List <SuperiorAddressModel>();
         superiorAddress.Add(new SuperiorAddressModel()
         {
             ID = -1, AddressName = @UIText.Noting
         });
         superiorAddress.AddRange(MGJH_TransportPointBLL.GetAddSuperiorAddress());
         model.SuperiorAddressSelectList = new SelectList(superiorAddress, "ID", "AddressName");
         return(PartialView("_AddReceiveTransportPoint", model));
     }
 }
 public ActionResult CheckAddPickUpAddressCodeExists(string addressCode)
 {
     return(Json(!MGJH_TransportPointBLL.CheckAddPickUpAddressCodeExists(addressCode)));
 }
 public ActionResult CheckEditPickUpAddressNameExists(string addressName, int id)
 {
     return(Json(!MGJH_TransportPointBLL.CheckEditPickUpAddressNameExists(addressName, id)));
 }
예제 #15
0
 public ActionResult CheckEditReceiveAddressCodeExists(string addressCode, int id)
 {
     return(Json(!MGJH_TransportPointBLL.CheckEditReceiveAddressCodeExists(addressCode, id)));
 }
예제 #16
0
 public ActionResult CheckAddReceiveAddressNameExists(string addressName)
 {
     return(Json(!MGJH_TransportPointBLL.CheckAddReceiveAddressNameExists(addressName)));
 }