예제 #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 EditSynchroReceivePoint(int id)
        {
            var result = MGJH_TransportPointBLL.GetSynchroReceivePointByID(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.GetAddSuperiorAddress());
            model.SuperiorAddressSelectList = new SelectList(superiorAddress, "ID", "AddressName");
            return(PartialView("_EditSynchroReceivePoint", model));
        }