Beispiel #1
0
 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;
 }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Maticsoft.Model.ps_outfall GetModel(string Exp_No)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select Prj_No,Prj_Name,Exp_No,MapCode,SewageSystem_ID,StormSystem_ID,Type,X,Y,High,Bottom_Elev,OutfallShape,OutfallType,Offset,Rotation,Code,Flap,Flap_Diameter,Flap_TopEle,Flap_BotEle,Flap_Materail,Receive,Address,PointPosition,DataSource,Visibility,Sunit,Sdate,UpdateTime,Mdate,Outfall_Type,Status,Ename,Design_Dept,Conster_Dept,Belong,Operator,Note,Exp_NoOri,FileName,Uploadtime from ps_outfall ");
            strSql.Append(" where Exp_No=@Exp_No ");
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@Exp_No", MySqlDbType.VarChar, 100)
            };
            parameters[0].Value = Exp_No;

            Maticsoft.Model.ps_outfall model = new Maticsoft.Model.ps_outfall();
            DataSet ds = DbHelperMySQL.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Maticsoft.Model.ps_outfall model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into ps_outfall(");
            strSql.Append("Prj_No,Prj_Name,Exp_No,MapCode,SewageSystem_ID,StormSystem_ID,Type,X,Y,High,Bottom_Elev,OutfallShape,OutfallType,Offset,Rotation,Code,Flap,Flap_Diameter,Flap_TopEle,Flap_BotEle,Flap_Materail,Receive,Address,PointPosition,DataSource,Visibility,Sunit,Sdate,UpdateTime,Mdate,Outfall_Type,Status,Ename,Design_Dept,Conster_Dept,Belong,Operator,Note,Exp_NoOri,FileName,Uploadtime)");
            strSql.Append(" values (");
            strSql.Append("@Prj_No,@Prj_Name,@Exp_No,@MapCode,@SewageSystem_ID,@StormSystem_ID,@Type,@X,@Y,@High,@Bottom_Elev,@OutfallShape,@OutfallType,@Offset,@Rotation,@Code,@Flap,@Flap_Diameter,@Flap_TopEle,@Flap_BotEle,@Flap_Materail,@Receive,@Address,@PointPosition,@DataSource,@Visibility,@Sunit,@Sdate,@UpdateTime,@Mdate,@Outfall_Type,@Status,@Ename,@Design_Dept,@Conster_Dept,@Belong,@Operator,@Note,@Exp_NoOri,@FileName,@Uploadtime)");
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@Prj_No",          MySqlDbType.VarChar, 255),
                new MySqlParameter("@Prj_Name",        MySqlDbType.VarChar, 255),
                new MySqlParameter("@Exp_No",          MySqlDbType.VarChar, 100),
                new MySqlParameter("@MapCode",         MySqlDbType.VarChar,  10),
                new MySqlParameter("@SewageSystem_ID", MySqlDbType.VarChar,  50),
                new MySqlParameter("@StormSystem_ID",  MySqlDbType.VarChar,  50),
                new MySqlParameter("@Type",            MySqlDbType.VarChar,   4),
                new MySqlParameter("@X",               MySqlDbType.Decimal,  10),
                new MySqlParameter("@Y",               MySqlDbType.Decimal,  10),
                new MySqlParameter("@High",            MySqlDbType.Decimal,  10),
                new MySqlParameter("@Bottom_Elev",     MySqlDbType.Decimal,   7),
                new MySqlParameter("@OutfallShape",    MySqlDbType.VarChar,  50),
                new MySqlParameter("@OutfallType",     MySqlDbType.VarChar,  10),
                new MySqlParameter("@Offset",          MySqlDbType.VarChar,  50),
                new MySqlParameter("@Rotation",        MySqlDbType.Decimal,   7),
                new MySqlParameter("@Code",            MySqlDbType.VarChar,  10),
                new MySqlParameter("@Flap",            MySqlDbType.VarChar,  10),
                new MySqlParameter("@Flap_Diameter",   MySqlDbType.Decimal,   7),
                new MySqlParameter("@Flap_TopEle",     MySqlDbType.Decimal,   7),
                new MySqlParameter("@Flap_BotEle",     MySqlDbType.Decimal,   7),
                new MySqlParameter("@Flap_Materail",   MySqlDbType.VarChar,  50),
                new MySqlParameter("@Receive",         MySqlDbType.VarChar,  50),
                new MySqlParameter("@Address",         MySqlDbType.VarChar, 100),
                new MySqlParameter("@PointPosition",   MySqlDbType.Int32,    10),
                new MySqlParameter("@DataSource",      MySqlDbType.VarChar,  10),
                new MySqlParameter("@Visibility",      MySqlDbType.VarChar,   4),
                new MySqlParameter("@Sunit",           MySqlDbType.VarChar, 255),
                new MySqlParameter("@Sdate",           MySqlDbType.VarChar, 255),
                new MySqlParameter("@UpdateTime",      MySqlDbType.VarChar, 255),
                new MySqlParameter("@Mdate",           MySqlDbType.VarChar, 255),
                new MySqlParameter("@Outfall_Type",    MySqlDbType.VarChar,  10),
                new MySqlParameter("@Status",          MySqlDbType.VarChar,  10),
                new MySqlParameter("@Ename",           MySqlDbType.VarChar, 100),
                new MySqlParameter("@Design_Dept",     MySqlDbType.VarChar, 255),
                new MySqlParameter("@Conster_Dept",    MySqlDbType.VarChar, 255),
                new MySqlParameter("@Belong",          MySqlDbType.VarChar, 255),
                new MySqlParameter("@Operator",        MySqlDbType.VarChar, 255),
                new MySqlParameter("@Note",            MySqlDbType.VarChar, 255),
                new MySqlParameter("@Exp_NoOri",       MySqlDbType.VarChar, 255),
                new MySqlParameter("@FileName",        MySqlDbType.VarChar, 255),
                new MySqlParameter("@Uploadtime",      MySqlDbType.VarChar, 255)
            };
            parameters[0].Value  = model.Prj_No;
            parameters[1].Value  = model.Prj_Name;
            parameters[2].Value  = model.Exp_No;
            parameters[3].Value  = model.MapCode;
            parameters[4].Value  = model.SewageSystem_ID;
            parameters[5].Value  = model.StormSystem_ID;
            parameters[6].Value  = model.Type;
            parameters[7].Value  = model.X;
            parameters[8].Value  = model.Y;
            parameters[9].Value  = model.High;
            parameters[10].Value = model.Bottom_Elev;
            parameters[11].Value = model.OutfallShape;
            parameters[12].Value = model.OutfallType;
            parameters[13].Value = model.Offset;
            parameters[14].Value = model.Rotation;
            parameters[15].Value = model.Code;
            parameters[16].Value = model.Flap;
            parameters[17].Value = model.Flap_Diameter;
            parameters[18].Value = model.Flap_TopEle;
            parameters[19].Value = model.Flap_BotEle;
            parameters[20].Value = model.Flap_Materail;
            parameters[21].Value = model.Receive;
            parameters[22].Value = model.Address;
            parameters[23].Value = model.PointPosition;
            parameters[24].Value = model.DataSource;
            parameters[25].Value = model.Visibility;
            parameters[26].Value = model.Sunit;
            parameters[27].Value = model.Sdate;
            parameters[28].Value = model.UpdateTime;
            parameters[29].Value = model.Mdate;
            parameters[30].Value = model.Outfall_Type;
            parameters[31].Value = model.Status;
            parameters[32].Value = model.Ename;
            parameters[33].Value = model.Design_Dept;
            parameters[34].Value = model.Conster_Dept;
            parameters[35].Value = model.Belong;
            parameters[36].Value = model.Operator;
            parameters[37].Value = model.Note;
            parameters[38].Value = model.Exp_NoOri;
            parameters[39].Value = model.FileName;
            parameters[40].Value = model.Uploadtime;

            int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public Maticsoft.Model.ps_outfall DataRowToModel(DataRow row)
 {
     Maticsoft.Model.ps_outfall model = new Maticsoft.Model.ps_outfall();
     if (row != null)
     {
         if (row["Prj_No"] != null)
         {
             model.Prj_No = row["Prj_No"].ToString();
         }
         if (row["Prj_Name"] != null)
         {
             model.Prj_Name = row["Prj_Name"].ToString();
         }
         if (row["Exp_No"] != null)
         {
             model.Exp_No = row["Exp_No"].ToString();
         }
         if (row["MapCode"] != null)
         {
             model.MapCode = row["MapCode"].ToString();
         }
         if (row["SewageSystem_ID"] != null)
         {
             model.SewageSystem_ID = row["SewageSystem_ID"].ToString();
         }
         if (row["StormSystem_ID"] != null)
         {
             model.StormSystem_ID = row["StormSystem_ID"].ToString();
         }
         if (row["Type"] != null)
         {
             model.Type = row["Type"].ToString();
         }
         if (row["X"] != null && row["X"].ToString() != "")
         {
             model.X = decimal.Parse(row["X"].ToString());
         }
         if (row["Y"] != null && row["Y"].ToString() != "")
         {
             model.Y = decimal.Parse(row["Y"].ToString());
         }
         if (row["High"] != null && row["High"].ToString() != "")
         {
             model.High = decimal.Parse(row["High"].ToString());
         }
         if (row["Bottom_Elev"] != null && row["Bottom_Elev"].ToString() != "")
         {
             model.Bottom_Elev = decimal.Parse(row["Bottom_Elev"].ToString());
         }
         if (row["OutfallShape"] != null)
         {
             model.OutfallShape = row["OutfallShape"].ToString();
         }
         if (row["OutfallType"] != null)
         {
             model.OutfallType = row["OutfallType"].ToString();
         }
         if (row["Offset"] != null)
         {
             model.Offset = row["Offset"].ToString();
         }
         if (row["Rotation"] != null && row["Rotation"].ToString() != "")
         {
             model.Rotation = decimal.Parse(row["Rotation"].ToString());
         }
         if (row["Code"] != null)
         {
             model.Code = row["Code"].ToString();
         }
         if (row["Flap"] != null)
         {
             model.Flap = row["Flap"].ToString();
         }
         if (row["Flap_Diameter"] != null && row["Flap_Diameter"].ToString() != "")
         {
             model.Flap_Diameter = decimal.Parse(row["Flap_Diameter"].ToString());
         }
         if (row["Flap_TopEle"] != null && row["Flap_TopEle"].ToString() != "")
         {
             model.Flap_TopEle = decimal.Parse(row["Flap_TopEle"].ToString());
         }
         if (row["Flap_BotEle"] != null && row["Flap_BotEle"].ToString() != "")
         {
             model.Flap_BotEle = decimal.Parse(row["Flap_BotEle"].ToString());
         }
         if (row["Flap_Materail"] != null)
         {
             model.Flap_Materail = row["Flap_Materail"].ToString();
         }
         if (row["Receive"] != null)
         {
             model.Receive = row["Receive"].ToString();
         }
         if (row["Address"] != null)
         {
             model.Address = row["Address"].ToString();
         }
         if (row["PointPosition"] != null && row["PointPosition"].ToString() != "")
         {
             model.PointPosition = int.Parse(row["PointPosition"].ToString());
         }
         if (row["DataSource"] != null)
         {
             model.DataSource = row["DataSource"].ToString();
         }
         if (row["Visibility"] != null)
         {
             model.Visibility = row["Visibility"].ToString();
         }
         if (row["Sunit"] != null)
         {
             model.Sunit = row["Sunit"].ToString();
         }
         if (row["Sdate"] != null)
         {
             model.Sdate = row["Sdate"].ToString();
         }
         if (row["UpdateTime"] != null)
         {
             model.UpdateTime = row["UpdateTime"].ToString();
         }
         if (row["Mdate"] != null)
         {
             model.Mdate = row["Mdate"].ToString();
         }
         if (row["Outfall_Type"] != null)
         {
             model.Outfall_Type = row["Outfall_Type"].ToString();
         }
         if (row["Status"] != null)
         {
             model.Status = row["Status"].ToString();
         }
         if (row["Ename"] != null)
         {
             model.Ename = row["Ename"].ToString();
         }
         if (row["Design_Dept"] != null)
         {
             model.Design_Dept = row["Design_Dept"].ToString();
         }
         if (row["Conster_Dept"] != null)
         {
             model.Conster_Dept = row["Conster_Dept"].ToString();
         }
         if (row["Belong"] != null)
         {
             model.Belong = row["Belong"].ToString();
         }
         if (row["Operator"] != null)
         {
             model.Operator = row["Operator"].ToString();
         }
         if (row["Note"] != null)
         {
             model.Note = row["Note"].ToString();
         }
         if (row["Exp_NoOri"] != null)
         {
             model.Exp_NoOri = row["Exp_NoOri"].ToString();
         }
         if (row["FileName"] != null)
         {
             model.FileName = row["FileName"].ToString();
         }
         if (row["Uploadtime"] != null)
         {
             model.Uploadtime = row["Uploadtime"].ToString();
         }
     }
     return(model);
 }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Maticsoft.Model.ps_outfall model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update ps_outfall set ");
            strSql.Append("Prj_No=@Prj_No,");
            strSql.Append("Prj_Name=@Prj_Name,");
            strSql.Append("MapCode=@MapCode,");
            strSql.Append("SewageSystem_ID=@SewageSystem_ID,");
            strSql.Append("StormSystem_ID=@StormSystem_ID,");
            strSql.Append("Type=@Type,");
            strSql.Append("X=@X,");
            strSql.Append("Y=@Y,");
            strSql.Append("High=@High,");
            strSql.Append("Bottom_Elev=@Bottom_Elev,");
            strSql.Append("OutfallShape=@OutfallShape,");
            strSql.Append("OutfallType=@OutfallType,");
            strSql.Append("Offset=@Offset,");
            strSql.Append("Rotation=@Rotation,");
            strSql.Append("Code=@Code,");
            strSql.Append("Flap=@Flap,");
            strSql.Append("Flap_Diameter=@Flap_Diameter,");
            strSql.Append("Flap_TopEle=@Flap_TopEle,");
            strSql.Append("Flap_BotEle=@Flap_BotEle,");
            strSql.Append("Flap_Materail=@Flap_Materail,");
            strSql.Append("Receive=@Receive,");
            strSql.Append("Address=@Address,");
            strSql.Append("PointPosition=@PointPosition,");
            strSql.Append("DataSource=@DataSource,");
            strSql.Append("Visibility=@Visibility,");
            strSql.Append("Sunit=@Sunit,");
            strSql.Append("Sdate=@Sdate,");
            strSql.Append("UpdateTime=@UpdateTime,");
            strSql.Append("Mdate=@Mdate,");
            strSql.Append("Outfall_Type=@Outfall_Type,");
            strSql.Append("Status=@Status,");
            strSql.Append("Ename=@Ename,");
            strSql.Append("Design_Dept=@Design_Dept,");
            strSql.Append("Conster_Dept=@Conster_Dept,");
            strSql.Append("Belong=@Belong,");
            strSql.Append("Operator=@Operator,");
            strSql.Append("Note=@Note,");
            strSql.Append("Exp_NoOri=@Exp_NoOri,");
            strSql.Append("FileName=@FileName,");
            strSql.Append("Uploadtime=@Uploadtime");
            strSql.Append(" where Exp_No=@Exp_No ");
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@Prj_No",          MySqlDbType.VarChar, 255),
                new MySqlParameter("@Prj_Name",        MySqlDbType.VarChar, 255),
                new MySqlParameter("@MapCode",         MySqlDbType.VarChar,  10),
                new MySqlParameter("@SewageSystem_ID", MySqlDbType.VarChar,  50),
                new MySqlParameter("@StormSystem_ID",  MySqlDbType.VarChar,  50),
                new MySqlParameter("@Type",            MySqlDbType.VarChar,   4),
                new MySqlParameter("@X",               MySqlDbType.Decimal,  10),
                new MySqlParameter("@Y",               MySqlDbType.Decimal,  10),
                new MySqlParameter("@High",            MySqlDbType.Decimal,  10),
                new MySqlParameter("@Bottom_Elev",     MySqlDbType.Decimal,   7),
                new MySqlParameter("@OutfallShape",    MySqlDbType.VarChar,  50),
                new MySqlParameter("@OutfallType",     MySqlDbType.VarChar,  10),
                new MySqlParameter("@Offset",          MySqlDbType.VarChar,  50),
                new MySqlParameter("@Rotation",        MySqlDbType.Decimal,   7),
                new MySqlParameter("@Code",            MySqlDbType.VarChar,  10),
                new MySqlParameter("@Flap",            MySqlDbType.VarChar,  10),
                new MySqlParameter("@Flap_Diameter",   MySqlDbType.Decimal,   7),
                new MySqlParameter("@Flap_TopEle",     MySqlDbType.Decimal,   7),
                new MySqlParameter("@Flap_BotEle",     MySqlDbType.Decimal,   7),
                new MySqlParameter("@Flap_Materail",   MySqlDbType.VarChar,  50),
                new MySqlParameter("@Receive",         MySqlDbType.VarChar,  50),
                new MySqlParameter("@Address",         MySqlDbType.VarChar, 100),
                new MySqlParameter("@PointPosition",   MySqlDbType.Int32,    10),
                new MySqlParameter("@DataSource",      MySqlDbType.VarChar,  10),
                new MySqlParameter("@Visibility",      MySqlDbType.VarChar,   4),
                new MySqlParameter("@Sunit",           MySqlDbType.VarChar, 255),
                new MySqlParameter("@Sdate",           MySqlDbType.VarChar, 255),
                new MySqlParameter("@UpdateTime",      MySqlDbType.VarChar, 255),
                new MySqlParameter("@Mdate",           MySqlDbType.VarChar, 255),
                new MySqlParameter("@Outfall_Type",    MySqlDbType.VarChar,  10),
                new MySqlParameter("@Status",          MySqlDbType.VarChar,  10),
                new MySqlParameter("@Ename",           MySqlDbType.VarChar, 100),
                new MySqlParameter("@Design_Dept",     MySqlDbType.VarChar, 255),
                new MySqlParameter("@Conster_Dept",    MySqlDbType.VarChar, 255),
                new MySqlParameter("@Belong",          MySqlDbType.VarChar, 255),
                new MySqlParameter("@Operator",        MySqlDbType.VarChar, 255),
                new MySqlParameter("@Note",            MySqlDbType.VarChar, 255),
                new MySqlParameter("@Exp_NoOri",       MySqlDbType.VarChar, 255),
                new MySqlParameter("@FileName",        MySqlDbType.VarChar, 255),
                new MySqlParameter("@Uploadtime",      MySqlDbType.VarChar, 255),
                new MySqlParameter("@Exp_No",          MySqlDbType.VarChar, 100)
            };
            parameters[0].Value  = model.Prj_No;
            parameters[1].Value  = model.Prj_Name;
            parameters[2].Value  = model.MapCode;
            parameters[3].Value  = model.SewageSystem_ID;
            parameters[4].Value  = model.StormSystem_ID;
            parameters[5].Value  = model.Type;
            parameters[6].Value  = model.X;
            parameters[7].Value  = model.Y;
            parameters[8].Value  = model.High;
            parameters[9].Value  = model.Bottom_Elev;
            parameters[10].Value = model.OutfallShape;
            parameters[11].Value = model.OutfallType;
            parameters[12].Value = model.Offset;
            parameters[13].Value = model.Rotation;
            parameters[14].Value = model.Code;
            parameters[15].Value = model.Flap;
            parameters[16].Value = model.Flap_Diameter;
            parameters[17].Value = model.Flap_TopEle;
            parameters[18].Value = model.Flap_BotEle;
            parameters[19].Value = model.Flap_Materail;
            parameters[20].Value = model.Receive;
            parameters[21].Value = model.Address;
            parameters[22].Value = model.PointPosition;
            parameters[23].Value = model.DataSource;
            parameters[24].Value = model.Visibility;
            parameters[25].Value = model.Sunit;
            parameters[26].Value = model.Sdate;
            parameters[27].Value = model.UpdateTime;
            parameters[28].Value = model.Mdate;
            parameters[29].Value = model.Outfall_Type;
            parameters[30].Value = model.Status;
            parameters[31].Value = model.Ename;
            parameters[32].Value = model.Design_Dept;
            parameters[33].Value = model.Conster_Dept;
            parameters[34].Value = model.Belong;
            parameters[35].Value = model.Operator;
            parameters[36].Value = model.Note;
            parameters[37].Value = model.Exp_NoOri;
            parameters[38].Value = model.FileName;
            parameters[39].Value = model.Uploadtime;
            parameters[40].Value = model.Exp_No;

            int rows = DbHelperMySQL.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Beispiel #6
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.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");
        }