/// <summary> /// 保存新建道路信息 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Save_Click(object sender, EventArgs e) { try { MyNet.DataAccess.Model.RoadInfo model = new DataAccess.Model.RoadInfo(); lab_message.Text = ""; model.DLBH = this.txtDLBHwin.Text; model.DLLX = this.cboRoadTypewin.Text; model.DLMC = this.txtRoadNamewin.Text; model.SSXQ = this.uiDepartment1.DepertId; model.ISMARK = "1"; model.XYZPOINT = listxyz; model.ROADID = tgsPproperty.GetRecordId(); if (string.IsNullOrEmpty(model.DLBH)) { model.DLBH = model.ROADID; } if (Session["isedit"].ToString() == "false") { listxyz = GetPointXY(Session["roadpoints"].ToString()); model.XYZPOINT = listxyz; if (!roadManager.Add(model)) { lab_message.Text = GetLangStr("GisRoadBrowse40", "提示:信息保存失败!"); } } else { model.ROADID = Session["ROADID"].ToString(); if (!roadManager.Update(model)) { lab_message.Text = GetLangStr("GisRoadBrowse40", "提示:信息保存失败!"); } } this.txtDLBHwin.Visible = false; win.Hide(); reShowData(); Notice(GetLangStr("GisRoadBrowse32", "信息提示"), (Session["isedit"].ToString() == "false" ? GetLangStr("GisRoadBrowse41", "保存成功!") : GetLangStr("GisRoadBrowse42", "修改成功!"))); } catch (Exception ex) { logManager.InsertLogError("GisRoadBrowse.aspx-Save_Click", ex.Message + ";" + ex.StackTrace, "Save_Click has an exception"); } }