Esempio n. 1
0
        public ActionResult NewTransportLimitedPrice(TransportLimitedPriceViewModel model)
        {
            if (ModelState.IsValid)
            {
                //创建数据
                TransportLimitedPrice data = new TransportLimitedPrice();
                data.PlanType = model.PlanType;
                data.StartCountry = model.StartCountry;
                data.StartProvince = model.StartProvince;
                data.StartCity = model.StartCity;
                data.DestCountry = model.DestCountry;
                data.DestProvince = model.DestProvince;
                data.DestCity = model.DestCity;
                data.CarType = model.CarType;
                data.MinTunnagesOrPiles = model.MinTunnagesOrPiles;
                data.MaxTunnagesOrPiles = model.MaxTunnagesOrPiles;
                data.StartTime = DateTime.Parse(model.StartTime);
                data.EndTime = DateTime.Parse(model.EndTime);
                data.TransportPrice = model.TransportPrice;
                data.TransportCharges = model.TransportCharges;

                //保存数据
                string strErrText;
                DDSystem dd = new DDSystem();
                if (dd.InsertTransportLimitedPrice(data, LoginAccountId, LoginStaffName, out strErrText))
                {
                    return Json(string.Empty);
                }
                else
                {
                    return Json(strErrText);
                }
            }
            return View(model);
        }