public void UpdateDirection() { try { Hashtable hs; string stationid = Session["stationid"] as string; if (string.IsNullOrEmpty(stationid)) { Message("信息提示", "请选择需要配置方向的电子警察监测位!"); return; } List <string> lst = new List <string>(); if (!string.IsNullOrEmpty(GridData.Text)) { string[] str = GridData.Text.Split(','); lst.AddRange(str); } if (lst.Count > 0) { hs = new Hashtable(); hs.Add("station_id", stationid); settingManager.DeleteDirectionInfo(hs); for (int i = 0; i < lst.Count; i++) { hs = new Hashtable(); hs.Add("station_id", stationid); hs.Add("direction_id", lst[i].ToString()); hs.Add("direction_name", ChageDirection(lst[i].ToString())); hs.Add("direction_desc", ChageDirection(lst[i].ToString())); settingManager.InsertDirectionInfo(hs); } Notice("信息提示", "保存成功"); GetStationData(); } } catch (Exception ex) { ILog.WriteErrorLog(ex); } }