private void ShowInfo(string Exp_No) { Maticsoft.BLL.ps_comb bll = new Maticsoft.BLL.ps_comb(); Maticsoft.Model.ps_comb 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.lblWellDeep.Text = model.WellDeep.ToString(); this.lblOffset.Text = model.Offset; this.lblRotation.Text = model.Rotation.ToString(); this.lblCode.Text = model.Code; this.lblInlet_Type.Text = model.Inlet_Type; this.lblWellShape.Text = model.WellShape; this.lblWellSize.Text = model.WellSize; this.lblWellMaterial.Text = model.WellMaterial; this.lblModel.Text = model.Model; this.lblWellPipes.Text = model.WellPipes.ToString(); 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.lblComb_Type.Text = model.Comb_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; }
private void ShowInfo(string Exp_No) { Maticsoft.BLL.ps_comb bll = new Maticsoft.BLL.ps_comb(); Maticsoft.Model.ps_comb model = bll.GetModel(Exp_No); this.txtPrj_No.Text = model.Prj_No; this.txtPrj_Name.Text = model.Prj_Name; this.lblExp_No.Text = model.Exp_No; this.txtMapCode.Text = model.MapCode; this.txtSewageSystem_ID.Text = model.SewageSystem_ID; this.txtStormSystem_ID.Text = model.StormSystem_ID; this.txtType.Text = model.Type; this.txtX.Text = model.X.ToString(); this.txtY.Text = model.Y.ToString(); this.txtHigh.Text = model.High.ToString(); this.txtWellDeep.Text = model.WellDeep.ToString(); this.txtOffset.Text = model.Offset; this.txtRotation.Text = model.Rotation.ToString(); this.txtCode.Text = model.Code; this.txtInlet_Type.Text = model.Inlet_Type; this.txtWellShape.Text = model.WellShape; this.txtWellSize.Text = model.WellSize; this.txtWellMaterial.Text = model.WellMaterial; this.txtModel.Text = model.Model; this.txtWellPipes.Text = model.WellPipes.ToString(); this.txtAddress.Text = model.Address; this.txtPointPosition.Text = model.PointPosition.ToString(); this.txtDataSource.Text = model.DataSource; this.txtVisibility.Text = model.Visibility; this.txtSunit.Text = model.Sunit; this.txtSdate.Text = model.Sdate; this.txtUpdateTime.Text = model.UpdateTime; this.txtMdate.Text = model.Mdate; this.txtComb_Type.Text = model.Comb_Type; this.txtStatus.Text = model.Status; this.txtEname.Text = model.Ename; this.txtDesign_Dept.Text = model.Design_Dept; this.txtConster_Dept.Text = model.Conster_Dept; this.txtBelong.Text = model.Belong; this.txtOperator.Text = model.Operator; this.txtNote.Text = model.Note; this.txtExp_NoOri.Text = model.Exp_NoOri; this.txtfilename.Text = model.filename; this.txtupdate.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(txtWellDeep.Text)) { strErr += "WellDeep格式错误!\\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.txtInlet_Type.Text.Trim().Length == 0) { strErr += "Inlet_Type不能为空!\\n"; } if (this.txtWellShape.Text.Trim().Length == 0) { strErr += "WellShape不能为空!\\n"; } if (this.txtWellSize.Text.Trim().Length == 0) { strErr += "WellSize不能为空!\\n"; } if (this.txtWellMaterial.Text.Trim().Length == 0) { strErr += "WellMaterial不能为空!\\n"; } if (this.txtModel.Text.Trim().Length == 0) { strErr += "Model不能为空!\\n"; } if (!PageValidate.IsNumber(txtWellPipes.Text)) { strErr += "WellPipes格式错误!\\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.txtComb_Type.Text.Trim().Length == 0) { strErr += "Comb_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 WellDeep = decimal.Parse(this.txtWellDeep.Text); string Offset = this.txtOffset.Text; decimal Rotation = decimal.Parse(this.txtRotation.Text); string Code = this.txtCode.Text; string Inlet_Type = this.txtInlet_Type.Text; string WellShape = this.txtWellShape.Text; string WellSize = this.txtWellSize.Text; string WellMaterial = this.txtWellMaterial.Text; string Model = this.txtModel.Text; int WellPipes = int.Parse(this.txtWellPipes.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 Comb_Type = this.txtComb_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_comb model = new Maticsoft.Model.ps_comb(); 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.WellDeep = WellDeep; model.Offset = Offset; model.Rotation = Rotation; model.Code = Code; model.Inlet_Type = Inlet_Type; model.WellShape = WellShape; model.WellSize = WellSize; model.WellMaterial = WellMaterial; model.Model = Model; model.WellPipes = WellPipes; 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.Comb_Type = Comb_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_comb bll = new Maticsoft.BLL.ps_comb(); 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; }