/// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tEnvFillAlkali">用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TEnvFillAlkaliVo tEnvFillAlkali)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tEnvFillAlkali, TEnvFillAlkaliVo.T_ENV_FILL_ALKALI_TABLE);

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

            strSQL = String.Format(strSQL, BuildWhereStatement(tEnvFillAlkali));
            return(SqlHelper.ExecuteDataTable(BuildPagerExpress(strSQL, iIndex, iCount)));
        }
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tEnvFillAlkali_UpdateSet">UpdateSet用户对象</param>
        /// <param name="tEnvFillAlkali_UpdateWhere">UpdateWhere用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TEnvFillAlkaliVo tEnvFillAlkali_UpdateSet, TEnvFillAlkaliVo tEnvFillAlkali_UpdateWhere)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tEnvFillAlkali_UpdateSet, TEnvFillAlkaliVo.T_ENV_FILL_ALKALI_TABLE);

            strSQL += this.BuildWhereStatement(tEnvFillAlkali_UpdateWhere);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
        /// <summary>
        /// 对象添加
        /// </summary>
        /// <param name="tEnvFillAlkali">对象</param>
        /// <returns>是否成功</returns>
        public bool Create(TEnvFillAlkaliVo tEnvFillAlkali)
        {
            string strSQL = SqlHelper.BuildInsertExpress(tEnvFillAlkali, TEnvFillAlkaliVo.T_ENV_FILL_ALKALI_TABLE);

            tEnvFillAlkali.ID = new TSysSerialAccess().GetSerialNumber("alkali_fill_id");
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
        /// <summary>
        /// 对象删除
        /// </summary>
        /// <param name="Id">ID</param>
        /// <returns>是否成功</returns>
        public bool Delete(TEnvFillAlkaliVo tEnvFillAlkali)
        {
            string strSQL = "delete from T_ENV_FILL_ALKALI ";

            strSQL += this.BuildWhereStatement(tEnvFillAlkali);

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

        TEnvFillAlkaliVo envFillAlkaliVo = new TEnvFillAlkaliVo();

        envFillAlkaliVo.YEAR  = year;
        envFillAlkaliVo.MONTH = month;

        envFillAlkaliVo = new TEnvFillAlkaliLogic().Details(envFillAlkaliVo);

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

        Response.ContentType = "application/json;charset=utf-8";
        Response.Write(json);
        Response.End();
    }
Beispiel #7
0
 /// <summary>
 /// 对象添加
 /// </summary>
 /// <param name="sysRole">对象</param>
 /// <returns>是否成功</returns>
 public bool Create(TEnvFillAlkaliVo tEnvFillAlkali)
 {
     return(access.Create(tEnvFillAlkali));
 }
Beispiel #8
0
 /// <summary>
 /// 获取对象DataTable
 /// </summary>
 /// <param name="tEnvFillAlkali">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public DataTable SelectByTable(TEnvFillAlkaliVo tEnvFillAlkali, int iIndex, int iCount)
 {
     return(access.SelectByTable(tEnvFillAlkali, iIndex, iCount));
 }
Beispiel #9
0
 /// <summary>
 /// 根据对象获取全部数据,用Table承载
 ///  数据量较小时使用【不推荐】
 /// </summary>
 /// <param name="tEnvFillAlkali"></param>
 /// <returns></returns>
 public DataTable SelectByTable(TEnvFillAlkaliVo tEnvFillAlkali)
 {
     return(access.SelectByTable(tEnvFillAlkali));
 }
Beispiel #10
0
 /// <summary>
 /// 对象明细
 /// </summary>
 /// <param name="tEnvFillAlkali">对象条件</param>
 /// <returns>对象</returns>
 public TEnvFillAlkaliVo Details(TEnvFillAlkaliVo tEnvFillAlkali)
 {
     return(access.Details(tEnvFillAlkali));
 }
Beispiel #11
0
 /// <summary>
 /// 获取对象List
 /// </summary>
 /// <param name="tEnvFillAlkali">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public List <TEnvFillAlkaliVo> SelectByObject(TEnvFillAlkaliVo tEnvFillAlkali, int iIndex, int iCount)
 {
     return(access.SelectByObject(tEnvFillAlkali, iIndex, iCount));
 }
Beispiel #12
0
 public TEnvFillAlkaliLogic(TEnvFillAlkaliVo _tEnvFillAlkali)
 {
     tEnvFillAlkali = _tEnvFillAlkali;
     access         = new TEnvFillAlkaliAccess();
 }
Beispiel #13
0
 /// <summary>
 /// 获得查询结果总行数,用于分页
 /// </summary>
 /// <param name="tEnvFillAlkali">对象</param>
 /// <returns>返回行数</returns>
 public int GetSelectResultCount(TEnvFillAlkaliVo tEnvFillAlkali)
 {
     return(access.GetSelectResultCount(tEnvFillAlkali));
 }
Beispiel #14
0
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tEnvFillAlkali_UpdateSet">UpdateSet用户对象</param>
 /// <param name="tEnvFillAlkali_UpdateWhere">UpdateWhere用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TEnvFillAlkaliVo tEnvFillAlkali_UpdateSet, TEnvFillAlkaliVo tEnvFillAlkali_UpdateWhere)
 {
     return(access.Edit(tEnvFillAlkali_UpdateSet, tEnvFillAlkali_UpdateWhere));
 }
Beispiel #15
0
 /// <summary>
 /// 对象删除
 /// </summary>
 /// <param name="Id">ID</param>
 /// <returns>是否成功</returns>
 public bool Delete(TEnvFillAlkaliVo tEnvFillAlkali)
 {
     return(access.Delete(tEnvFillAlkali));
 }
        /// <summary>
        /// 根据对象构造条件语句
        /// </summary>
        /// <param name="tEnvFillAlkali"></param>
        /// <returns></returns>
        public string BuildWhereStatement(TEnvFillAlkaliVo tEnvFillAlkali)
        {
            StringBuilder strWhereStatement = new StringBuilder(" Where 1=1 ");

            if (null != tEnvFillAlkali)
            {
                //主键ID
                if (!String.IsNullOrEmpty(tEnvFillAlkali.ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ID = '{0}'", tEnvFillAlkali.ID.ToString()));
                }
                //年度
                if (!String.IsNullOrEmpty(tEnvFillAlkali.YEAR.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND YEAR = '{0}'", tEnvFillAlkali.YEAR.ToString()));
                }
                //月度
                if (!String.IsNullOrEmpty(tEnvFillAlkali.MONTH.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND MONTH = '{0}'", tEnvFillAlkali.MONTH.ToString()));
                }
                //监测点ID
                if (!String.IsNullOrEmpty(tEnvFillAlkali.POINT_ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND POINT_ID = '{0}'", tEnvFillAlkali.POINT_ID.ToString()));
                }
                //开始月
                if (!String.IsNullOrEmpty(tEnvFillAlkali.BEGIN_MONTH.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND BEGIN_MONTH = '{0}'", tEnvFillAlkali.BEGIN_MONTH.ToString()));
                }
                //开始日
                if (!String.IsNullOrEmpty(tEnvFillAlkali.BEGIN_DAY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND BEGIN_DAY = '{0}'", tEnvFillAlkali.BEGIN_DAY.ToString()));
                }
                //开始时
                if (!String.IsNullOrEmpty(tEnvFillAlkali.BEGIN_HOUR.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND BEGIN_HOUR = '{0}'", tEnvFillAlkali.BEGIN_HOUR.ToString()));
                }
                //开始分
                if (!String.IsNullOrEmpty(tEnvFillAlkali.BEGIN_MINUTE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND BEGIN_MINUTE = '{0}'", tEnvFillAlkali.BEGIN_MINUTE.ToString()));
                }
                //结束月
                if (!String.IsNullOrEmpty(tEnvFillAlkali.END_MONTH.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND END_MONTH = '{0}'", tEnvFillAlkali.END_MONTH.ToString()));
                }
                //结束日
                if (!String.IsNullOrEmpty(tEnvFillAlkali.END_DAY.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND END_DAY = '{0}'", tEnvFillAlkali.END_DAY.ToString()));
                }
                //结束时
                if (!String.IsNullOrEmpty(tEnvFillAlkali.END_HOUR.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND END_HOUR = '{0}'", tEnvFillAlkali.END_HOUR.ToString()));
                }
                //结束分
                if (!String.IsNullOrEmpty(tEnvFillAlkali.END_MINUTE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND END_MINUTE = '{0}'", tEnvFillAlkali.END_MINUTE.ToString()));
                }
                //备注1
                if (!String.IsNullOrEmpty(tEnvFillAlkali.REMARK1.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK1 = '{0}'", tEnvFillAlkali.REMARK1.ToString()));
                }
                //备注2
                if (!String.IsNullOrEmpty(tEnvFillAlkali.REMARK2.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK2 = '{0}'", tEnvFillAlkali.REMARK2.ToString()));
                }
                //备注3
                if (!String.IsNullOrEmpty(tEnvFillAlkali.REMARK3.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK3 = '{0}'", tEnvFillAlkali.REMARK3.ToString()));
                }
                //备注4
                if (!String.IsNullOrEmpty(tEnvFillAlkali.REMARK4.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK4 = '{0}'", tEnvFillAlkali.REMARK4.ToString()));
                }
                //备注5
                if (!String.IsNullOrEmpty(tEnvFillAlkali.REMARK5.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK5 = '{0}'", tEnvFillAlkali.REMARK5.ToString()));
                }
            }
            return(strWhereStatement.ToString());
        }
Beispiel #17
0
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tEnvFillAlkali">用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TEnvFillAlkaliVo tEnvFillAlkali)
 {
     return(access.Edit(tEnvFillAlkali));
 }
Beispiel #18
0
 /// <summary>
 /// 根据对象特征获取单一对象
 /// </summary>
 /// <param name="tEnvFillAlkali">对象</param>
 /// <returns></returns>
 public TEnvFillAlkaliVo SelectByObject(TEnvFillAlkaliVo tEnvFillAlkali)
 {
     return(access.SelectByObject(tEnvFillAlkali));
 }
        /// <summary>
        /// 根据对象获取全部数据,用Table承载
        ///  数据量较小时使用【不推荐】
        /// </summary>
        /// <param name="tEnvFillAlkali"></param>
        /// <returns></returns>
        public DataTable SelectByTable(TEnvFillAlkaliVo tEnvFillAlkali)
        {
            string strSQL = "select * from T_ENV_FILL_ALKALI " + this.BuildWhereStatement(tEnvFillAlkali);

            return(SqlHelper.ExecuteDataTable(strSQL));
        }
        /// <summary>
        /// 获得查询结果总行数,用于分页
        /// </summary>
        /// <param name="tEnvFillAlkali">对象</param>
        /// <returns>返回行数</returns>
        public int GetSelectResultCount(TEnvFillAlkaliVo tEnvFillAlkali)
        {
            string strSQL = "select Count(*) from T_ENV_FILL_ALKALI " + this.BuildWhereStatement(tEnvFillAlkali);

            return(Convert.ToInt32(SqlHelper.ExecuteScalar(strSQL)));
        }
        /// <summary>
        /// 获取对象List
        /// </summary>
        /// <param name="tEnvFillAlkali">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public List <TEnvFillAlkaliVo> SelectByObject(TEnvFillAlkaliVo tEnvFillAlkali, int iIndex, int iCount)
        {
            string strSQL = String.Format("select * from  T_ENV_FILL_ALKALI " + this.BuildWhereStatement(tEnvFillAlkali));

            return(SqlHelper.ExecuteObjectList(tEnvFillAlkali, BuildPagerExpress(strSQL, iIndex, iCount)));
        }
        /// <summary>
        /// 对象明细
        /// </summary>
        /// <param name="tEnvFillAlkali">对象条件</param>
        /// <returns>对象</returns>
        public TEnvFillAlkaliVo Details(TEnvFillAlkaliVo tEnvFillAlkali)
        {
            string strSQL = String.Format("select * from  T_ENV_FILL_ALKALI " + this.BuildWhereStatement(tEnvFillAlkali));

            return(SqlHelper.ExecuteObject(new TEnvFillAlkaliVo(), strSQL));
        }