예제 #1
0
 private void ShowInfo(string Exp_No)
 {
     Maticsoft.BLL.ps_wwtp   bll   = new Maticsoft.BLL.ps_wwtp();
     Maticsoft.Model.ps_wwtp 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.lblName.Text            = model.Name;
     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.lblWWTPType.Text             = model.WWTPType;
     this.lblPs_Num.Text               = model.Ps_Num;
     this.lblTreatment_Level.Text      = model.Treatment_Level;
     this.lblTreatment_Technology.Text = model.Treatment_Technology;
     this.lblReceiveWater.Text         = model.ReceiveWater;
     this.lblDesign_Capa.Text          = model.Design_Capa.ToString();
     this.lblSludgeDesign_Capa.Text    = model.SludgeDesign_Capa.ToString();
     this.lblCode.Text                 = model.Code;
     this.lblAddress.Text              = model.Address;
     this.lblPointPosition.Text        = model.PointPosition.ToString();
     this.lblDataSource.Text           = model.DataSource;
     this.lblSunit.Text                = model.Sunit;
     this.lblSdate.Text                = model.Sdate;
     this.lblUpdateTime.Text           = model.UpdateTime;
     this.lblMdate.Text                = model.Mdate;
     this.lblDataListID.Text           = model.DataListID;
     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;
 }
예제 #2
0
 private void ShowInfo(string Exp_No)
 {
     Maticsoft.BLL.ps_wwtp   bll   = new Maticsoft.BLL.ps_wwtp();
     Maticsoft.Model.ps_wwtp 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.txtName.Text            = model.Name;
     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.txtWWTPType.Text             = model.WWTPType;
     this.txtPs_Num.Text               = model.Ps_Num;
     this.txtTreatment_Level.Text      = model.Treatment_Level;
     this.txtTreatment_Technology.Text = model.Treatment_Technology;
     this.txtReceiveWater.Text         = model.ReceiveWater;
     this.txtDesign_Capa.Text          = model.Design_Capa.ToString();
     this.txtSludgeDesign_Capa.Text    = model.SludgeDesign_Capa.ToString();
     this.txtCode.Text                 = model.Code;
     this.txtAddress.Text              = model.Address;
     this.txtPointPosition.Text        = model.PointPosition.ToString();
     this.txtDataSource.Text           = model.DataSource;
     this.txtSunit.Text                = model.Sunit;
     this.txtSdate.Text                = model.Sdate;
     this.txtUpdateTime.Text           = model.UpdateTime;
     this.txtMdate.Text                = model.Mdate;
     this.txtDataListID.Text           = model.DataListID;
     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;
 }
예제 #3
0
        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.txtName.Text.Trim().Length == 0)
            {
                strErr += "Name不能为空!\\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 (this.txtWWTPType.Text.Trim().Length == 0)
            {
                strErr += "WWTPType不能为空!\\n";
            }
            if (this.txtPs_Num.Text.Trim().Length == 0)
            {
                strErr += "Ps_Num不能为空!\\n";
            }
            if (this.txtTreatment_Level.Text.Trim().Length == 0)
            {
                strErr += "Treatment_Level不能为空!\\n";
            }
            if (this.txtTreatment_Technology.Text.Trim().Length == 0)
            {
                strErr += "Treatment_Technology不能为空!\\n";
            }
            if (this.txtReceiveWater.Text.Trim().Length == 0)
            {
                strErr += "ReceiveWater不能为空!\\n";
            }
            if (!PageValidate.IsDecimal(txtDesign_Capa.Text))
            {
                strErr += "Design_Capa格式错误!\\n";
            }
            if (!PageValidate.IsDecimal(txtSludgeDesign_Capa.Text))
            {
                strErr += "SludgeDesign_Capa格式错误!\\n";
            }
            if (this.txtCode.Text.Trim().Length == 0)
            {
                strErr += "Code不能为空!\\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.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.txtDataListID.Text.Trim().Length == 0)
            {
                strErr += "DataListID不能为空!\\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  Name            = this.txtName.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);
            string  WWTPType             = this.txtWWTPType.Text;
            string  Ps_Num               = this.txtPs_Num.Text;
            string  Treatment_Level      = this.txtTreatment_Level.Text;
            string  Treatment_Technology = this.txtTreatment_Technology.Text;
            string  ReceiveWater         = this.txtReceiveWater.Text;
            decimal Design_Capa          = decimal.Parse(this.txtDesign_Capa.Text);
            decimal SludgeDesign_Capa    = decimal.Parse(this.txtSludgeDesign_Capa.Text);
            string  Code                 = this.txtCode.Text;
            string  Address              = this.txtAddress.Text;
            int     PointPosition        = int.Parse(this.txtPointPosition.Text);
            string  DataSource           = this.txtDataSource.Text;
            string  Sunit                = this.txtSunit.Text;
            string  Sdate                = this.txtSdate.Text;
            string  UpdateTime           = this.txtUpdateTime.Text;
            string  Mdate                = this.txtMdate.Text;
            string  DataListID           = this.txtDataListID.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_wwtp model = new Maticsoft.Model.ps_wwtp();
            model.Prj_No          = Prj_No;
            model.Prj_Name        = Prj_Name;
            model.Exp_No          = Exp_No;
            model.MapCode         = MapCode;
            model.Name            = Name;
            model.SewageSystem_ID = SewageSystem_ID;
            model.StormSystem_ID  = StormSystem_ID;
            model.Type            = Type;
            model.X                    = X;
            model.Y                    = Y;
            model.High                 = High;
            model.WWTPType             = WWTPType;
            model.Ps_Num               = Ps_Num;
            model.Treatment_Level      = Treatment_Level;
            model.Treatment_Technology = Treatment_Technology;
            model.ReceiveWater         = ReceiveWater;
            model.Design_Capa          = Design_Capa;
            model.SludgeDesign_Capa    = SludgeDesign_Capa;
            model.Code                 = Code;
            model.Address              = Address;
            model.PointPosition        = PointPosition;
            model.DataSource           = DataSource;
            model.Sunit                = Sunit;
            model.Sdate                = Sdate;
            model.UpdateTime           = UpdateTime;
            model.Mdate                = Mdate;
            model.DataListID           = DataListID;
            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_wwtp bll = new Maticsoft.BLL.ps_wwtp();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }
예제 #4
0
        /// <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;
        }