private void ShowInfo(string Exp_No) { Maticsoft.BLL.ps_outfall bll = new Maticsoft.BLL.ps_outfall(); Maticsoft.Model.ps_outfall model = bll.GetModel(Exp_No); this.lblPrj_No.Text = model.Prj_No; this.lblPrj_Name.Text = model.Prj_Name; this.lblExp_No.Text = model.Exp_No; this.lblMapCode.Text = model.MapCode; this.lblSewageSystem_ID.Text = model.SewageSystem_ID; this.lblStormSystem_ID.Text = model.StormSystem_ID; this.lblType.Text = model.Type; this.lblX.Text = model.X.ToString(); this.lblY.Text = model.Y.ToString(); this.lblHigh.Text = model.High.ToString(); this.lblBottom_Elev.Text = model.Bottom_Elev.ToString(); this.lblOutfallShape.Text = model.OutfallShape; this.lblOutfallType.Text = model.OutfallType; this.lblOffset.Text = model.Offset; this.lblRotation.Text = model.Rotation.ToString(); this.lblCode.Text = model.Code; this.lblFlap.Text = model.Flap; this.lblFlap_Diameter.Text = model.Flap_Diameter.ToString(); this.lblFlap_TopEle.Text = model.Flap_TopEle.ToString(); this.lblFlap_BotEle.Text = model.Flap_BotEle.ToString(); this.lblFlap_Materail.Text = model.Flap_Materail; this.lblReceive.Text = model.Receive; this.lblAddress.Text = model.Address; this.lblPointPosition.Text = model.PointPosition.ToString(); this.lblDataSource.Text = model.DataSource; this.lblVisibility.Text = model.Visibility; this.lblSunit.Text = model.Sunit; this.lblSdate.Text = model.Sdate; this.lblUpdateTime.Text = model.UpdateTime; this.lblMdate.Text = model.Mdate; this.lblOutfall_Type.Text = model.Outfall_Type; this.lblStatus.Text = model.Status; this.lblEname.Text = model.Ename; this.lblDesign_Dept.Text = model.Design_Dept; this.lblConster_Dept.Text = model.Conster_Dept; this.lblBelong.Text = model.Belong; this.lblOperator.Text = model.Operator; this.lblNote.Text = model.Note; this.lblExp_NoOri.Text = model.Exp_NoOri; this.lblfilename.Text = model.filename; this.lblupdate.Text = model.update; }
protected void btnSave_Click(object sender, EventArgs e) { string strErr = ""; if (this.txtPrj_No.Text.Trim().Length == 0) { strErr += "Prj_No不能为空!\\n"; } if (this.txtPrj_Name.Text.Trim().Length == 0) { strErr += "Prj_Name不能为空!\\n"; } if (this.txtExp_No.Text.Trim().Length == 0) { strErr += "Exp_No不能为空!\\n"; } if (this.txtMapCode.Text.Trim().Length == 0) { strErr += "MapCode不能为空!\\n"; } if (this.txtSewageSystem_ID.Text.Trim().Length == 0) { strErr += "SewageSystem_ID不能为空!\\n"; } if (this.txtStormSystem_ID.Text.Trim().Length == 0) { strErr += "StormSystem_ID不能为空!\\n"; } if (this.txtType.Text.Trim().Length == 0) { strErr += "Type不能为空!\\n"; } if (!PageValidate.IsDecimal(txtX.Text)) { strErr += "X格式错误!\\n"; } if (!PageValidate.IsDecimal(txtY.Text)) { strErr += "Y格式错误!\\n"; } if (!PageValidate.IsDecimal(txtHigh.Text)) { strErr += "High格式错误!\\n"; } if (!PageValidate.IsDecimal(txtBottom_Elev.Text)) { strErr += "Bottom_Elev格式错误!\\n"; } if (this.txtOutfallShape.Text.Trim().Length == 0) { strErr += "OutfallShape不能为空!\\n"; } if (this.txtOutfallType.Text.Trim().Length == 0) { strErr += "OutfallType不能为空!\\n"; } if (this.txtOffset.Text.Trim().Length == 0) { strErr += "Offset不能为空!\\n"; } if (!PageValidate.IsDecimal(txtRotation.Text)) { strErr += "Rotation格式错误!\\n"; } if (this.txtCode.Text.Trim().Length == 0) { strErr += "Code不能为空!\\n"; } if (this.txtFlap.Text.Trim().Length == 0) { strErr += "Flap不能为空!\\n"; } if (!PageValidate.IsDecimal(txtFlap_Diameter.Text)) { strErr += "Flap_Diameter格式错误!\\n"; } if (!PageValidate.IsDecimal(txtFlap_TopEle.Text)) { strErr += "Flap_TopEle格式错误!\\n"; } if (!PageValidate.IsDecimal(txtFlap_BotEle.Text)) { strErr += "Flap_BotEle格式错误!\\n"; } if (this.txtFlap_Materail.Text.Trim().Length == 0) { strErr += "Flap_Materail不能为空!\\n"; } if (this.txtReceive.Text.Trim().Length == 0) { strErr += "Receive不能为空!\\n"; } if (this.txtAddress.Text.Trim().Length == 0) { strErr += "Address不能为空!\\n"; } if (!PageValidate.IsNumber(txtPointPosition.Text)) { strErr += "PointPosition格式错误!\\n"; } if (this.txtDataSource.Text.Trim().Length == 0) { strErr += "DataSource不能为空!\\n"; } if (this.txtVisibility.Text.Trim().Length == 0) { strErr += "Visibility不能为空!\\n"; } if (this.txtSunit.Text.Trim().Length == 0) { strErr += "Sunit不能为空!\\n"; } if (this.txtSdate.Text.Trim().Length == 0) { strErr += "Sdate不能为空!\\n"; } if (this.txtUpdateTime.Text.Trim().Length == 0) { strErr += "UpdateTime不能为空!\\n"; } if (this.txtMdate.Text.Trim().Length == 0) { strErr += "Mdate不能为空!\\n"; } if (this.txtOutfall_Type.Text.Trim().Length == 0) { strErr += "Outfall_Type不能为空!\\n"; } if (this.txtStatus.Text.Trim().Length == 0) { strErr += "Status不能为空!\\n"; } if (this.txtEname.Text.Trim().Length == 0) { strErr += "Ename不能为空!\\n"; } if (this.txtDesign_Dept.Text.Trim().Length == 0) { strErr += "Design_Dept不能为空!\\n"; } if (this.txtConster_Dept.Text.Trim().Length == 0) { strErr += "Conster_Dept不能为空!\\n"; } if (this.txtBelong.Text.Trim().Length == 0) { strErr += "Belong不能为空!\\n"; } if (this.txtOperator.Text.Trim().Length == 0) { strErr += "Operator不能为空!\\n"; } if (this.txtNote.Text.Trim().Length == 0) { strErr += "Note不能为空!\\n"; } if (this.txtExp_NoOri.Text.Trim().Length == 0) { strErr += "Exp_NoOri不能为空!\\n"; } if (this.txtfilename.Text.Trim().Length == 0) { strErr += "filename不能为空!\\n"; } if (this.txtupdate.Text.Trim().Length == 0) { strErr += "update不能为空!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } string Prj_No = this.txtPrj_No.Text; string Prj_Name = this.txtPrj_Name.Text; string Exp_No = this.txtExp_No.Text; string MapCode = this.txtMapCode.Text; string SewageSystem_ID = this.txtSewageSystem_ID.Text; string StormSystem_ID = this.txtStormSystem_ID.Text; string Type = this.txtType.Text; decimal X = decimal.Parse(this.txtX.Text); decimal Y = decimal.Parse(this.txtY.Text); decimal High = decimal.Parse(this.txtHigh.Text); decimal Bottom_Elev = decimal.Parse(this.txtBottom_Elev.Text); string OutfallShape = this.txtOutfallShape.Text; string OutfallType = this.txtOutfallType.Text; string Offset = this.txtOffset.Text; decimal Rotation = decimal.Parse(this.txtRotation.Text); string Code = this.txtCode.Text; string Flap = this.txtFlap.Text; decimal Flap_Diameter = decimal.Parse(this.txtFlap_Diameter.Text); decimal Flap_TopEle = decimal.Parse(this.txtFlap_TopEle.Text); decimal Flap_BotEle = decimal.Parse(this.txtFlap_BotEle.Text); string Flap_Materail = this.txtFlap_Materail.Text; string Receive = this.txtReceive.Text; string Address = this.txtAddress.Text; int PointPosition = int.Parse(this.txtPointPosition.Text); string DataSource = this.txtDataSource.Text; string Visibility = this.txtVisibility.Text; string Sunit = this.txtSunit.Text; string Sdate = this.txtSdate.Text; string UpdateTime = this.txtUpdateTime.Text; string Mdate = this.txtMdate.Text; string Outfall_Type = this.txtOutfall_Type.Text; string Status = this.txtStatus.Text; string Ename = this.txtEname.Text; string Design_Dept = this.txtDesign_Dept.Text; string Conster_Dept = this.txtConster_Dept.Text; string Belong = this.txtBelong.Text; string Operator = this.txtOperator.Text; string Note = this.txtNote.Text; string Exp_NoOri = this.txtExp_NoOri.Text; string filename = this.txtfilename.Text; string update = this.txtupdate.Text; Maticsoft.Model.ps_outfall model = new Maticsoft.Model.ps_outfall(); model.Prj_No = Prj_No; model.Prj_Name = Prj_Name; model.Exp_No = Exp_No; model.MapCode = MapCode; model.SewageSystem_ID = SewageSystem_ID; model.StormSystem_ID = StormSystem_ID; model.Type = Type; model.X = X; model.Y = Y; model.High = High; model.Bottom_Elev = Bottom_Elev; model.OutfallShape = OutfallShape; model.OutfallType = OutfallType; model.Offset = Offset; model.Rotation = Rotation; model.Code = Code; model.Flap = Flap; model.Flap_Diameter = Flap_Diameter; model.Flap_TopEle = Flap_TopEle; model.Flap_BotEle = Flap_BotEle; model.Flap_Materail = Flap_Materail; model.Receive = Receive; model.Address = Address; model.PointPosition = PointPosition; model.DataSource = DataSource; model.Visibility = Visibility; model.Sunit = Sunit; model.Sdate = Sdate; model.UpdateTime = UpdateTime; model.Mdate = Mdate; model.Outfall_Type = Outfall_Type; model.Status = Status; model.Ename = Ename; model.Design_Dept = Design_Dept; model.Conster_Dept = Conster_Dept; model.Belong = Belong; model.Operator = Operator; model.Note = Note; model.Exp_NoOri = Exp_NoOri; model.filename = filename; model.update = update; Maticsoft.BLL.ps_outfall bll = new Maticsoft.BLL.ps_outfall(); bll.Add(model); Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx"); }
/// <summary> /// 删除点相关的内容 /// </summary> /// <returns></returns> private void DeletePointRealeatTables() { Maticsoft.BLL.cjplp cjplpBLL = new Maticsoft.BLL.cjplp(); Maticsoft.BLL.ps_comb ps_combBLL = new Maticsoft.BLL.ps_comb(); Maticsoft.BLL.ps_discharger ps_dischargerBLL = new Maticsoft.BLL.ps_discharger(); Maticsoft.BLL.ps_gate ps_gateBLL = new Maticsoft.BLL.ps_gate(); Maticsoft.BLL.ps_manhole ps_manholeBLL = new Maticsoft.BLL.ps_manhole(); Maticsoft.BLL.ps_outfall ps_outfallBLL = new Maticsoft.BLL.ps_outfall(); Maticsoft.BLL.ps_point ps_pointBLL = new Maticsoft.BLL.ps_point(); Maticsoft.BLL.ps_pumpstation ps_pumpstationBLL = new Maticsoft.BLL.ps_pumpstation(); Maticsoft.BLL.ps_retention ps_retentionBLL = new Maticsoft.BLL.ps_retention(); Maticsoft.BLL.ps_valve ps_valveBLL = new Maticsoft.BLL.ps_valve(); Maticsoft.BLL.ps_weir ps_weirBLL = new Maticsoft.BLL.ps_weir(); Maticsoft.BLL.ps_wwtp ps_wwtpBLL = new Maticsoft.BLL.ps_wwtp(); //删除选择的内容 if (this.listBoxControlDeleteBlock.Items.Count > 0) { //构造sql查询语句 string strWhere = String.Empty; ; for (int i = 0; i < listBoxControlDeleteBlock.Items.Count; i++) { if (i == listBoxControlDeleteBlock.Items.Count - 1) { strWhere += "FileName='" + listBoxControlDeleteBlock.Items[i].ToString() + "'"; } else { strWhere += "FileName='" + listBoxControlDeleteBlock.Items[i].ToString() + "' or"; } } //删除cjplp原始数据库的点 List <Maticsoft.Model.cjplp> deleteCjplpsModelList = cjplpBLL.GetModelList(strWhere); for (int j = 0; j < deleteCjplpsModelList.Count; j++) { cjplpBLL.Delete(deleteCjplpsModelList[j].Exp_NoOri); } //删除cjplp原始数据库的点 List <Maticsoft.Model.ps_comb> deleteps_combModelList = ps_combBLL.GetModelList(strWhere); for (int j = 0; j < deleteps_combModelList.Count; j++) { cjplpBLL.Delete(deleteps_combModelList[j].Exp_NoOri); } //删除cjplp原始数据库的点 List <Maticsoft.Model.ps_discharger> deleteps_dischargerModelList = ps_dischargerBLL.GetModelList(strWhere); for (int j = 0; j < deleteps_dischargerModelList.Count; j++) { cjplpBLL.Delete(deleteps_dischargerModelList[j].Exp_NoOri); } //删除cjplp原始数据库的点 List <Maticsoft.Model.ps_gate> deleteps_gateModelList = ps_gateBLL.GetModelList(strWhere); for (int j = 0; j < deleteps_gateModelList.Count; j++) { cjplpBLL.Delete(deleteps_gateModelList[j].Exp_NoOri); } //删除cjplp原始数据库的点 List <Maticsoft.Model.ps_manhole> deleteps_manholeModelList = ps_manholeBLL.GetModelList(strWhere); for (int j = 0; j < deleteps_manholeModelList.Count; j++) { cjplpBLL.Delete(deleteps_manholeModelList[j].Exp_NoOri); } //删除cjplp原始数据库的点 List <Maticsoft.Model.ps_outfall> deleteps_outfallModelList = ps_outfallBLL.GetModelList(strWhere); for (int j = 0; j < deleteps_outfallModelList.Count; j++) { cjplpBLL.Delete(deleteps_outfallModelList[j].Exp_NoOri); } //删除cjplp原始数据库的点 List <Maticsoft.Model.ps_point> deleteps_pointModelList = ps_pointBLL.GetModelList(strWhere); for (int j = 0; j < deleteps_pointModelList.Count; j++) { cjplpBLL.Delete(deleteps_pointModelList[j].Exp_NoOri); } //删除cjplp原始数据库的点 List <Maticsoft.Model.ps_pumpstation> deleteps_pumpstationModelList = ps_pumpstationBLL.GetModelList(strWhere); for (int j = 0; j < deleteps_pumpstationModelList.Count; j++) { cjplpBLL.Delete(deleteps_pumpstationModelList[j].Exp_NoOri); } //删除cjplp原始数据库的点 List <Maticsoft.Model.ps_retention> deleteps_retentionModelList = ps_retentionBLL.GetModelList(strWhere); for (int j = 0; j < deleteps_retentionModelList.Count; j++) { cjplpBLL.Delete(deleteps_retentionModelList[j].Exp_NoOri); } //删除cjplp原始数据库的点 List <Maticsoft.Model.ps_valve> deleteps_valveModelList = ps_valveBLL.GetModelList(strWhere); for (int j = 0; j < deleteps_valveModelList.Count; j++) { cjplpBLL.Delete(deleteps_valveModelList[j].Exp_NoOri); } //删除cjplp原始数据库的点 List <Maticsoft.Model.ps_weir> deleteps_weirModelList = ps_weirBLL.GetModelList(strWhere); for (int j = 0; j < deleteps_weirModelList.Count; j++) { cjplpBLL.Delete(deleteps_weirModelList[j].Exp_NoOri); } //删除cjplp原始数据库的点 List <Maticsoft.Model.ps_wwtp> deleteps_wwtpModelList = ps_wwtpBLL.GetModelList(strWhere); for (int j = 0; j < deleteps_wwtpModelList.Count; j++) { cjplpBLL.Delete(deleteps_wwtpModelList[j].Exp_NoOri); } //同步编码表 // AsynData.asynRecordTabl(); } // return cjplpBLL; }