| | |
| | | 锘縰sing WIDESEA_IServices; |
| | | 锘縰sing AngleSharp.Dom; |
| | | using System.Reflection; |
| | | using WIDESEA_Core.Utilities; |
| | | using WIDESEA_IServices; |
| | | using WIDESEAWCS_BasicInfoRepository; |
| | | using WIDESEAWCS_Model.Models; |
| | | |
| | |
| | | return content.Error($"娣诲姞澶辫触:{ex.Message}"); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 淇敼鏁版嵁 |
| | | /// </summary> |
| | | /// <param name="saveModel"></param> |
| | | /// <returns></returns> |
| | | public virtual WebResponseContent UpdateData(SaveModel saveModel) |
| | | { |
| | | try |
| | | { |
| | | int id = int.Parse(saveModel.MainData["id"].ToString()); |
| | | string carType = saveModel.MainData["carType"].ToString(); |
| | | string mttype = saveModel.MainData["mttype"].ToString(); |
| | | string neworold = saveModel.MainData["neworold"].ToString(); |
| | | string gkdj = saveModel.MainData["gkdj"].ToString(); |
| | | decimal lowerValue = Convert.ToDecimal(saveModel.MainData["lowerValue"]); |
| | | decimal upperValue = Convert.ToDecimal(saveModel.MainData["upperValue"]); |
| | | int isCantainGK = saveModel.MainData["isCantainGK"].ObjToInt(); |
| | | decimal lowerValue_gk = Convert.ToDecimal(saveModel.MainData["lowerValue_gk"]); |
| | | decimal upperValue_gk = Convert.ToDecimal(saveModel.MainData["upperValue_gk"]); |
| | | |
| | | Dt_SelectionStandards dt_Selection = BaseDal.QueryFirst(x => x.ID == id); |
| | | dt_Selection.CarType=carType; |
| | | dt_Selection.mttype=mttype; |
| | | dt_Selection.neworold = neworold; |
| | | dt_Selection.gkdj = gkdj; |
| | | dt_Selection.lowerValue = lowerValue; |
| | | dt_Selection.upperValue = upperValue; |
| | | dt_Selection.isCantainGK = isCantainGK != 0 ? true : false; |
| | | dt_Selection.lowerValue_gk = lowerValue_gk; |
| | | dt_Selection.upperValue_gk = upperValue_gk; |
| | | |
| | | |
| | | if (BaseDal.UpdateData(dt_Selection)) |
| | | { |
| | | return WebResponseContent.Instance.OK("娣诲姞鎴愬姛"); |
| | | } |
| | | else |
| | | { |
| | | return WebResponseContent.Instance.Error("娣诲姞澶辫触"); |
| | | } |
| | | |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | return WebResponseContent.Instance.Error(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | } |