private string PageSave(string tourId) { string OperaterID = this.OperateID.Value; if (SiteUserInfo.UserId != OperaterID) { return(EyouSoft.Common.UtilsCommons.AjaxReturnJson("0", "你不是该计划的销售员,无法修改车型!")); } string msg = string.Empty; string[] CarTypeId = Utils.GetFormValues(PresetBusType1.hidCarTypeIdClientID); string[] CarTypeName = Utils.GetFormValues(PresetBusType1.hidCarTypeNameClientID); string[] Desc = Utils.GetFormValues(PresetBusType1.hidDescClientID); string[] SeatNum = Utils.GetFormValues(PresetBusType1.hidSeatNumClientID); string[] TourCarTypeId = Utils.GetFormValues(PresetBusType1.hideTourCarTypeIdClientID); EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour(); IList <MTourCarType> list = new List <MTourCarType>(); if (CarTypeId.Length > 0) { for (int i = 0; i < CarTypeId.Length; i++) { if (CarTypeName[i].ToString() != "") { MTourCarType model = new MTourCarType(); model.TourCarTypeId = TourCarTypeId[i].ToString(); model.SeatNum = Utils.GetInt(SeatNum[i].ToString()); model.Desc = Desc[i].ToString(); model.CarTypeName = CarTypeName[i].ToString(); model.CarTypeId = CarTypeId[i].ToString(); list.Add(model); } } } if (!string.IsNullOrEmpty(msg)) { return(EyouSoft.Common.UtilsCommons.AjaxReturnJson("0", msg)); } else { if (bll.UpdateTourCarType(tourId, SiteUserInfo.Username, SiteUserInfo.UserId, list)) { return(EyouSoft.Common.UtilsCommons.AjaxReturnJson("1", "修改成功!")); } else { return(EyouSoft.Common.UtilsCommons.AjaxReturnJson("0", "修改失败!")); } } }