Beispiel #1
0
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tEnvFillAirks_UpdateSet">UpdateSet用户对象</param>
        /// <param name="tEnvFillAirks_UpdateWhere">UpdateWhere用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TEnvFillAirksVo tEnvFillAirks_UpdateSet, TEnvFillAirksVo tEnvFillAirks_UpdateWhere)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tEnvFillAirks_UpdateSet, TEnvFillAirksVo.T_ENV_FILL_AIRKS_TABLE);

            strSQL += this.BuildWhereStatement(tEnvFillAirks_UpdateWhere);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Beispiel #2
0
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tEnvFillAirks">用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TEnvFillAirksVo tEnvFillAirks)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tEnvFillAirks, TEnvFillAirksVo.T_ENV_FILL_AIRKS_TABLE);

            strSQL += string.Format(" where ID='{0}' ", tEnvFillAirks.ID);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Beispiel #3
0
        /// <summary>
        /// 获取对象DataTable
        /// </summary>
        /// <param name="tEnvFillAirks">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public DataTable SelectByTable(TEnvFillAirksVo tEnvFillAirks, int iIndex, int iCount)
        {
            string strSQL = " select * from T_ENV_FILL_AIRKS {0} ";

            strSQL = String.Format(strSQL, BuildWhereStatement(tEnvFillAirks));
            return(SqlHelper.ExecuteDataTable(BuildPagerExpress(strSQL, iIndex, iCount)));
        }
Beispiel #4
0
        /// <summary>
        /// 对象删除
        /// </summary>
        /// <param name="Id">ID</param>
        /// <returns>是否成功</returns>
        public bool Delete(TEnvFillAirksVo tEnvFillAirks)
        {
            string strSQL = "delete from T_ENV_FILL_AIRKS ";

            strSQL += this.BuildWhereStatement(tEnvFillAirks);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
    private void GetFillID()
    {
        string year  = Request["year"];
        string month = Request["month"];

        TEnvFillAirksVo envFillAirKsVo = new TEnvFillAirksVo();

        envFillAirKsVo.YEAR  = year;
        envFillAirKsVo.MONTH = month;

        envFillAirKsVo = new TEnvFillAirksLogic().Details(envFillAirKsVo);

        string json = "{\"ID\":\"" + envFillAirKsVo.ID + "\",\"STATUS\":\"" + envFillAirKsVo.STATUS + "\"}";

        Response.ContentType = "application/json;charset=utf-8";
        Response.Write(json);
        Response.End();
    }
Beispiel #6
0
        /// <summary>
        /// 根据对象构造条件语句
        /// </summary>
        /// <param name="tEnvFillAirks"></param>
        /// <returns></returns>
        public string BuildWhereStatement(TEnvFillAirksVo tEnvFillAirks)
        {
            StringBuilder strWhereStatement = new StringBuilder(" Where 1=1 ");

            if (null != tEnvFillAirks)
            {
                //主键ID
                if (!String.IsNullOrEmpty(tEnvFillAirks.ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ID = '{0}'", tEnvFillAirks.ID.ToString()));
                }
                //监测点ID
                if (!String.IsNullOrEmpty(tEnvFillAirks.POINT_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND POINT_ID = '{0}'", tEnvFillAirks.POINT_ID.ToString()));
                }
                //年度
                if (!String.IsNullOrEmpty(tEnvFillAirks.YEAR.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND YEAR = '{0}'", tEnvFillAirks.YEAR.ToString()));
                }
                //月度
                if (!String.IsNullOrEmpty(tEnvFillAirks.MONTH.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND MONTH = '{0}'", tEnvFillAirks.MONTH.ToString()));
                }
                //监测起始月
                if (!String.IsNullOrEmpty(tEnvFillAirks.BEGIN_MONTH.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND BEGIN_MONTH = '{0}'", tEnvFillAirks.BEGIN_MONTH.ToString()));
                }
                //监测起始日
                if (!String.IsNullOrEmpty(tEnvFillAirks.BEGIN_DAY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND BEGIN_DAY = '{0}'", tEnvFillAirks.BEGIN_DAY.ToString()));
                }
                //监测起始时
                if (!String.IsNullOrEmpty(tEnvFillAirks.BEGIN_HOUR.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND BEGIN_HOUR = '{0}'", tEnvFillAirks.BEGIN_HOUR.ToString()));
                }
                //监测起始分
                if (!String.IsNullOrEmpty(tEnvFillAirks.BEGIN_MINUTE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND BEGIN_MINUTE = '{0}'", tEnvFillAirks.BEGIN_MINUTE.ToString()));
                }
                //监测结束月
                if (!String.IsNullOrEmpty(tEnvFillAirks.END_MONTH.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND END_MONTH = '{0}'", tEnvFillAirks.END_MONTH.ToString()));
                }
                //监测结束日
                if (!String.IsNullOrEmpty(tEnvFillAirks.END_DAY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND END_DAY = '{0}'", tEnvFillAirks.END_DAY.ToString()));
                }
                //监测结束时
                if (!String.IsNullOrEmpty(tEnvFillAirks.END_HOUR.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND END_HOUR = '{0}'", tEnvFillAirks.END_HOUR.ToString()));
                }
                //监测结束分
                if (!String.IsNullOrEmpty(tEnvFillAirks.END_MINUTE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND END_MINUTE = '{0}'", tEnvFillAirks.END_MINUTE.ToString()));
                }
                //备注1
                if (!String.IsNullOrEmpty(tEnvFillAirks.REMARK1.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK1 = '{0}'", tEnvFillAirks.REMARK1.ToString()));
                }
                //备注2
                if (!String.IsNullOrEmpty(tEnvFillAirks.REMARK2.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK2 = '{0}'", tEnvFillAirks.REMARK2.ToString()));
                }
                //备注3
                if (!String.IsNullOrEmpty(tEnvFillAirks.REMARK3.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK3 = '{0}'", tEnvFillAirks.REMARK3.ToString()));
                }
                //备注4
                if (!String.IsNullOrEmpty(tEnvFillAirks.REMARK4.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK4 = '{0}'", tEnvFillAirks.REMARK4.ToString()));
                }
                //备注5
                if (!String.IsNullOrEmpty(tEnvFillAirks.REMARK5.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK5 = '{0}'", tEnvFillAirks.REMARK5.ToString()));
                }
            }
            return(strWhereStatement.ToString());
        }
Beispiel #7
0
 /// <summary>
 /// 根据对象获取全部数据,用Table承载
 ///  数据量较小时使用【不推荐】
 /// </summary>
 /// <param name="tEnvFillAirks"></param>
 /// <returns></returns>
 public DataTable SelectByTable(TEnvFillAirksVo tEnvFillAirks)
 {
     return(access.SelectByTable(tEnvFillAirks));
 }
Beispiel #8
0
        /// <summary>
        /// 对象明细
        /// </summary>
        /// <param name="tEnvFillAirks">对象条件</param>
        /// <returns>对象</returns>
        public TEnvFillAirksVo Details(TEnvFillAirksVo tEnvFillAirks)
        {
            string strSQL = String.Format("select * from  T_ENV_FILL_AIRKS " + this.BuildWhereStatement(tEnvFillAirks));

            return(SqlHelper.ExecuteObject(new TEnvFillAirksVo(), strSQL));
        }
Beispiel #9
0
        /// <summary>
        /// 获取对象List
        /// </summary>
        /// <param name="tEnvFillAirks">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public List <TEnvFillAirksVo> SelectByObject(TEnvFillAirksVo tEnvFillAirks, int iIndex, int iCount)
        {
            string strSQL = String.Format("select * from  T_ENV_FILL_AIRKS " + this.BuildWhereStatement(tEnvFillAirks));

            return(SqlHelper.ExecuteObjectList(tEnvFillAirks, BuildPagerExpress(strSQL, iIndex, iCount)));
        }
Beispiel #10
0
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tEnvFillAirks">用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TEnvFillAirksVo tEnvFillAirks)
 {
     return(access.Edit(tEnvFillAirks));
 }
Beispiel #11
0
        /// <summary>
        /// 获得查询结果总行数,用于分页
        /// </summary>
        /// <param name="tEnvFillAirks">对象</param>
        /// <returns>返回行数</returns>
        public int GetSelectResultCount(TEnvFillAirksVo tEnvFillAirks)
        {
            string strSQL = "select Count(*) from T_ENV_FILL_AIRKS " + this.BuildWhereStatement(tEnvFillAirks);

            return(Convert.ToInt32(SqlHelper.ExecuteScalar(strSQL)));
        }
Beispiel #12
0
 /// <summary>
 /// 对象删除
 /// </summary>
 /// <param name="Id">ID</param>
 /// <returns>是否成功</returns>
 public bool Delete(TEnvFillAirksVo tEnvFillAirks)
 {
     return(access.Delete(tEnvFillAirks));
 }
Beispiel #13
0
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tEnvFillAirks_UpdateSet">UpdateSet用户对象</param>
 /// <param name="tEnvFillAirks_UpdateWhere">UpdateWhere用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TEnvFillAirksVo tEnvFillAirks_UpdateSet, TEnvFillAirksVo tEnvFillAirks_UpdateWhere)
 {
     return(access.Edit(tEnvFillAirks_UpdateSet, tEnvFillAirks_UpdateWhere));
 }
Beispiel #14
0
        /// <summary>
        /// 根据对象获取全部数据,用Table承载
        ///  数据量较小时使用【不推荐】
        /// </summary>
        /// <param name="tEnvFillAirks"></param>
        /// <returns></returns>
        public DataTable SelectByTable(TEnvFillAirksVo tEnvFillAirks)
        {
            string strSQL = "select * from T_ENV_FILL_AIRKS " + this.BuildWhereStatement(tEnvFillAirks);

            return(SqlHelper.ExecuteDataTable(strSQL));
        }
Beispiel #15
0
 /// <summary>
 /// 对象添加
 /// </summary>
 /// <param name="sysRole">对象</param>
 /// <returns>是否成功</returns>
 public bool Create(TEnvFillAirksVo tEnvFillAirks)
 {
     return(access.Create(tEnvFillAirks));
 }
Beispiel #16
0
 /// <summary>
 /// 获取对象DataTable
 /// </summary>
 /// <param name="tEnvFillAirks">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public DataTable SelectByTable(TEnvFillAirksVo tEnvFillAirks, int iIndex, int iCount)
 {
     return(access.SelectByTable(tEnvFillAirks, iIndex, iCount));
 }
Beispiel #17
0
 /// <summary>
 /// 获取对象List
 /// </summary>
 /// <param name="tEnvFillAirks">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public List <TEnvFillAirksVo> SelectByObject(TEnvFillAirksVo tEnvFillAirks, int iIndex, int iCount)
 {
     return(access.SelectByObject(tEnvFillAirks, iIndex, iCount));
 }
Beispiel #18
0
 /// <summary>
 /// 对象明细
 /// </summary>
 /// <param name="tEnvFillAirks">对象条件</param>
 /// <returns>对象</returns>
 public TEnvFillAirksVo Details(TEnvFillAirksVo tEnvFillAirks)
 {
     return(access.Details(tEnvFillAirks));
 }
Beispiel #19
0
 /// <summary>
 /// 获得查询结果总行数,用于分页
 /// </summary>
 /// <param name="tEnvFillAirks">对象</param>
 /// <returns>返回行数</returns>
 public int GetSelectResultCount(TEnvFillAirksVo tEnvFillAirks)
 {
     return(access.GetSelectResultCount(tEnvFillAirks));
 }
Beispiel #20
0
 public TEnvFillAirksLogic(TEnvFillAirksVo _tEnvFillAirks)
 {
     tEnvFillAirks = _tEnvFillAirks;
     access        = new TEnvFillAirksAccess();
 }
Beispiel #21
0
        /// <summary>
        /// 对象添加
        /// </summary>
        /// <param name="tEnvFillAirks">对象</param>
        /// <returns>是否成功</returns>
        public bool Create(TEnvFillAirksVo tEnvFillAirks)
        {
            string strSQL = SqlHelper.BuildInsertExpress(tEnvFillAirks, TEnvFillAirksVo.T_ENV_FILL_AIRKS_TABLE);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Beispiel #22
0
 /// <summary>
 /// 根据对象特征获取单一对象
 /// </summary>
 /// <param name="tEnvFillAirks">对象</param>
 /// <returns></returns>
 public TEnvFillAirksVo SelectByObject(TEnvFillAirksVo tEnvFillAirks)
 {
     return(access.SelectByObject(tEnvFillAirks));
 }