/// <summary> /// 增加数据 /// </summary> /// <returns></returns> public string frmAdd() { string strMsg = ""; bool isSuccess = true; TEnvPSeabathVo TEnvPointSeaVo = autoBindRequest(Request, new TEnvPSeabathVo()); //TEnvPointSeaVo.ID = GetSerialNumber("seapoint_id"); TEnvPointSeaVo.IS_DEL = "0"; //bool isSuccess = new TEnvPSeabathLogic().Create(TEnvPointSeaVo, SerialType.T_ENV_P_SEABATH); //if (isSuccess) // WriteLog("添加海水浴场监测点", "", LogInfo.UserInfo.USER_NAME + "添加海水浴场监测点" + TEnvPointSeaVo.ID); //return isSuccess == true ? "1" : "0"; string Meg = new CommonLogic().isExistDatas(TEnvPSeabathVo.T_ENV_P_SEABATH_TABLE, TEnvPointSeaVo.YEAR, TEnvPointSeaVo.SelectMonths, TEnvPSeabathVo.POINT_NAME_FIELD, TEnvPointSeaVo.POINT_NAME, TEnvPSeabathVo.POINT_CODE_FIELD, TEnvPointSeaVo.POINT_CODE, TEnvPSeabathVo.ID_FIELD, TEnvPointSeaVo.ID, 0); if (!string.IsNullOrEmpty(Meg)) { strMsg = Meg; isSuccess = false; } else { isSuccess = new TEnvPSeabathLogic().Create(TEnvPointSeaVo, SerialType.T_ENV_P_SEABATH); if (isSuccess) { WriteLog("添加海水浴场监测点", "", LogInfo.UserInfo.USER_NAME + "添加海水浴场监测点:" + TEnvPointSeaVo.ID); strMsg = "数据保存成功"; } else { strMsg = "数据保存失败"; } } return(isSuccess == true ? "{\"result\":\"success\",\"msg\":\"" + strMsg + "\"}" : "{\"result\":\"fail\",\"msg\":\"" + strMsg + "\"}"); }
/// <summary> /// 对象编辑 /// </summary> /// <param name="tEnvPSeabath_UpdateSet">UpdateSet用户对象</param> /// <param name="tEnvPSeabath_UpdateWhere">UpdateWhere用户对象</param> /// <returns>是否成功</returns> public bool Edit(TEnvPSeabathVo tEnvPSeabath_UpdateSet, TEnvPSeabathVo tEnvPSeabath_UpdateWhere) { string strSQL = SqlHelper.BuildUpdateExpress(tEnvPSeabath_UpdateSet, TEnvPSeabathVo.T_ENV_P_SEABATH_TABLE); strSQL += this.BuildWhereStatement(tEnvPSeabath_UpdateWhere); return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false); }
/// <summary> /// 对象编辑 /// </summary> /// <param name="tEnvPSeabath">用户对象</param> /// <returns>是否成功</returns> public bool Edit(TEnvPSeabathVo tEnvPSeabath) { string strSQL = SqlHelper.BuildUpdateExpress(tEnvPSeabath, TEnvPSeabathVo.T_ENV_P_SEABATH_TABLE); strSQL += string.Format(" where ID='{0}' ", tEnvPSeabath.ID); return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false); }
/// <summary> /// 获取对象DataTable /// </summary> /// <param name="tEnvPSeabath">对象</param> /// <param name="iIndex">起始页码</param> /// <param name="iCount">每页数目</param> /// <returns>返回结果</returns> public DataTable SelectByTable(TEnvPSeabathVo tEnvPSeabath, int iIndex, int iCount) { string strSQL = " select * from T_ENV_P_SEABATH {0} "; strSQL = String.Format(strSQL, BuildWhereStatement(tEnvPSeabath)); return(SqlHelper.ExecuteDataTable(BuildPagerExpress(strSQL, iIndex, iCount))); }
/// <summary> /// 对象删除 /// </summary> /// <param name="Id">ID</param> /// <returns>是否成功</returns> public bool Delete(TEnvPSeabathVo tEnvPSeabath) { string strSQL = "delete from T_ENV_P_SEABATH "; strSQL += this.BuildWhereStatement(tEnvPSeabath); return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false); }
public static string deleteOneGridInfo(string strValue) { TEnvPSeabathVo TEnvPointRainVo = new TEnvPSeabathVo(); TEnvPointRainVo.ID = strValue; TEnvPointRainVo.IS_DEL = "1"; bool isSuccess = new TEnvPSeabathLogic().Edit(TEnvPointRainVo); if (isSuccess) { new PageBase().WriteLog("删除海水浴场监测点", "", new UserLogInfo().UserInfo.USER_NAME + "删除海水浴场监测点" + TEnvPointRainVo.ID); } return(isSuccess == true ? "1" : "0"); }
/// <summary> /// 加载数据 /// </summary> /// <returns></returns> public string frmLoadData() { TEnvPSeabathVo TEnvPointSeaVo = new TEnvPSeabathVo(); TEnvPointSeaVo.ID = Request["id"].ToString(); TEnvPointSeaVo.IS_DEL = "0"; TEnvPSeabathVo TEnvPointSeaVoTemp = new TEnvPSeabathLogic().Details(TEnvPointSeaVo); //条件项ID string strConditionId = TEnvPointSeaVoTemp.CONDITION_ID; //根据条件项获取评价标准名称 string strStanderId = new i3.BusinessLogic.Channels.Base.Evaluation.TBaseEvaluationConInfoLogic().Details(strConditionId).STANDARD_ID; //根据评价标准ID获取评价标准名称 string strStanderName = new i3.BusinessLogic.Channels.Base.Evaluation.TBaseEvaluationInfoLogic().Details(strStanderId).STANDARD_NAME; TEnvPointSeaVoTemp.REMARK1 = strStanderName; return(ToJson(TEnvPointSeaVoTemp)); }
/// <summary> /// 对象添加(ljn.2013/6/14) /// </summary> /// <param name="tEnvPAir">对象</param> /// <returns>是否成功</returns> public bool Create(TEnvPSeabathVo tEnvPSeabath, string Number) { ArrayList list = new ArrayList(); string strSQL = string.Empty; List <string> values = tEnvPSeabath.SelectMonths.Split(';').ToList(); tEnvPSeabath.SelectMonths = string.Empty; foreach (string valueTemp in values) { tEnvPSeabath.ID = GetSerialNumber(Number); tEnvPSeabath.MONTH = valueTemp; strSQL = SqlHelper.BuildInsertExpress(tEnvPSeabath, TEnvPSeabathVo.T_ENV_P_SEABATH_TABLE); list.Add(strSQL); } return(SqlHelper.ExecuteSQLByTransaction(list)); //string strSQL = SqlHelper.BuildInsertExpress(tEnvPAir, TEnvPAirVo.T_ENV_P_AIR_TABLE); //return SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false; }
/// <summary> /// 修改数据 /// </summary> /// <returns></returns> public string frmUpdate() { TEnvPSeabathVo TEnvPointSeaVo = autoBindRequest(Request, new TEnvPSeabathVo()); TEnvPointSeaVo.ID = Request["id"].ToString(); TEnvPointSeaVo.IS_DEL = "0"; //bool isSuccess = new TEnvPSeabathLogic().Edit(TEnvPointSeaVo); //if (isSuccess) // WriteLog("编辑海水浴场监测点", "", LogInfo.UserInfo.USER_NAME + "编辑海水浴场监测点" + TEnvPointSeaVo.ID); //return isSuccess == true ? "1" : "0"; string strMsg = ""; bool isSuccess = true; if (hidYear.Value.Trim() != TEnvPointSeaVo.YEAR || hidMonth.Value.Trim() != TEnvPointSeaVo.MONTH || hidValue.Value.Trim() != TEnvPointSeaVo.POINT_NAME || hidValues.Value.Trim() != TEnvPointSeaVo.POINT_CODE) { //验证数据是否重复 strMsg = new CommonLogic().isExistDatas(TEnvPSeabathVo.T_ENV_P_SEABATH_TABLE, TEnvPointSeaVo.YEAR, TEnvPointSeaVo.MONTH, TEnvPSeabathVo.POINT_NAME_FIELD, TEnvPointSeaVo.POINT_NAME, TEnvPSeabathVo.POINT_CODE_FIELD, TEnvPointSeaVo.POINT_CODE, TEnvPSeabathVo.ID_FIELD, TEnvPointSeaVo.ID, 0); if (string.IsNullOrEmpty(strMsg)) { isSuccess = true; } else { isSuccess = false; } } if (isSuccess) { isSuccess = new TEnvPSeabathLogic().Edit(TEnvPointSeaVo); if (isSuccess) { WriteLog("编辑海水浴场监测点", "", LogInfo.UserInfo.USER_NAME + "编辑海水浴场监测点" + TEnvPointSeaVo.ID); strMsg = "数据更新成功"; } else { strMsg = "数据更新失败"; } } return(isSuccess == true ? "{\"result\":\"success\",\"msg\":\"" + strMsg + "\"}" : "{\"result\":\"fail\",\"msg\":\"" + strMsg + "\"}"); }
/// <summary> /// 获取监测点信息 /// </summary> /// <returns></returns> private string getOneGridInfo() { string strSortname = Request.Params["sortname"]; string strSortorder = Request.Params["sortorder"]; //当前页面 int intPageIndex = Convert.ToInt32(Request.Params["page"]); //每页记录数 int intPageSize = Convert.ToInt32(Request.Params["pagesize"]); TEnvPSeabathVo TEnvPointRainVo = new TEnvPSeabathVo(); TEnvPointRainVo.IS_DEL = "0"; TEnvPointRainVo.SORT_FIELD = strSortname; TEnvPointRainVo.SORT_TYPE = strSortorder; DataTable dt = new TEnvPSeabathLogic().SelectByTable(TEnvPointRainVo, intPageIndex, intPageSize); int intTotalCount = new TEnvPSeabathLogic().GetSelectResultCount(TEnvPointRainVo); string strJson = CreateToJson(dt, intTotalCount); return(strJson); }
private void GetPoint() { string year = Request["year"]; string month = Request["month"]; TEnvPSeabathVo Dustpoint = new TEnvPSeabathVo();//降尘点位 Dustpoint.YEAR = year; Dustpoint.MONTH = month; Dustpoint.IS_DEL = "0";//删除标志 DataTable dt = new i3.BusinessLogic.Channels.Env.Point.Seabath.TEnvPSeabathLogic().SelectByTable(Dustpoint); //加入全部 DataRow dr = dt.NewRow(); dr["POINT_NAME"] = "--全部--"; dt.Rows.InsertAt(dr, 0); string json = DataTableToJson(dt); Response.ContentType = "application/json;charset=utf-8"; Response.Write(json); Response.End(); }
/// <summary> /// 根据对象构造条件语句 /// </summary> /// <param name="tEnvPSeabath"></param> /// <returns></returns> public string BuildWhereStatement(TEnvPSeabathVo tEnvPSeabath) { StringBuilder strWhereStatement = new StringBuilder(" Where 1=1 "); if (null != tEnvPSeabath) { //ID if (!String.IsNullOrEmpty(tEnvPSeabath.ID.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND ID = '{0}'", tEnvPSeabath.ID.ToString())); } //年份 if (!String.IsNullOrEmpty(tEnvPSeabath.YEAR.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND YEAR = '{0}'", tEnvPSeabath.YEAR.ToString())); } //月度 if (!String.IsNullOrEmpty(tEnvPSeabath.MONTH.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND MONTH = '{0}'", tEnvPSeabath.MONTH.ToString())); } //监测点名称 if (!String.IsNullOrEmpty(tEnvPSeabath.POINT_NAME.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND POINT_NAME = '{0}'", tEnvPSeabath.POINT_NAME.ToString())); } // //监测点代码 if (!String.IsNullOrEmpty(tEnvPSeabath.POINT_NAME.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND POINT_NAME = '{0}'", tEnvPSeabath.POINT_NAME.ToString())); } // //功能区代码 if (!String.IsNullOrEmpty(tEnvPSeabath.FUNCTION_CODE.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND FUNCTION_CODE = '{0}'", tEnvPSeabath.FUNCTION_CODE.ToString())); } //海区ID(字典项) if (!String.IsNullOrEmpty(tEnvPSeabath.SEA_AREA_ID.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND SEA_AREA_ID = '{0}'", tEnvPSeabath.SEA_AREA_ID.ToString())); } //重点海域ID(字典项) if (!String.IsNullOrEmpty(tEnvPSeabath.KEY_SEA_ID.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND KEY_SEA_ID = '{0}'", tEnvPSeabath.KEY_SEA_ID.ToString())); } //国家编号 if (!String.IsNullOrEmpty(tEnvPSeabath.COUNTRY_CODE.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND COUNTRY_CODE = '{0}'", tEnvPSeabath.COUNTRY_CODE.ToString())); } //省份编号 if (!String.IsNullOrEmpty(tEnvPSeabath.PROVINCE_CODE.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND PROVINCE_CODE = '{0}'", tEnvPSeabath.PROVINCE_CODE.ToString())); } //点位类别 if (!String.IsNullOrEmpty(tEnvPSeabath.POINT_TYPE.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND POINT_TYPE = '{0}'", tEnvPSeabath.POINT_TYPE.ToString())); } //经度(度) if (!String.IsNullOrEmpty(tEnvPSeabath.LONGITUDE_DEGREE.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND LONGITUDE_DEGREE = '{0}'", tEnvPSeabath.LONGITUDE_DEGREE.ToString())); } //经度(分) if (!String.IsNullOrEmpty(tEnvPSeabath.LONGITUDE_MINUTE.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND LONGITUDE_MINUTE = '{0}'", tEnvPSeabath.LONGITUDE_MINUTE.ToString())); } //经度(秒) if (!String.IsNullOrEmpty(tEnvPSeabath.LONGITUDE_SECOND.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND LONGITUDE_SECOND = '{0}'", tEnvPSeabath.LONGITUDE_SECOND.ToString())); } //纬度(度) if (!String.IsNullOrEmpty(tEnvPSeabath.LATITUDE_DEGREE.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND LATITUDE_DEGREE = '{0}'", tEnvPSeabath.LATITUDE_DEGREE.ToString())); } //纬度(分) if (!String.IsNullOrEmpty(tEnvPSeabath.LATITUDE_MINUTE.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND LATITUDE_MINUTE = '{0}'", tEnvPSeabath.LATITUDE_MINUTE.ToString())); } //纬度(秒) if (!String.IsNullOrEmpty(tEnvPSeabath.LATITUDE_SECOND.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND LATITUDE_SECOND = '{0}'", tEnvPSeabath.LATITUDE_SECOND.ToString())); } //具体位置 if (!String.IsNullOrEmpty(tEnvPSeabath.LOCATION.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND LOCATION = '{0}'", tEnvPSeabath.LOCATION.ToString())); } //条件项 if (!String.IsNullOrEmpty(tEnvPSeabath.CONDITION_ID.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND CONDITION_ID = '{0}'", tEnvPSeabath.CONDITION_ID.ToString())); } //删除标记 if (!String.IsNullOrEmpty(tEnvPSeabath.IS_DEL.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND IS_DEL = '{0}'", tEnvPSeabath.IS_DEL.ToString())); } //序号 if (!String.IsNullOrEmpty(tEnvPSeabath.NUM.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND NUM = '{0}'", tEnvPSeabath.NUM.ToString())); } //备注1 if (!String.IsNullOrEmpty(tEnvPSeabath.REMARK1.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND REMARK1 = '{0}'", tEnvPSeabath.REMARK1.ToString())); } //备注2 if (!String.IsNullOrEmpty(tEnvPSeabath.REMARK2.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND REMARK2 = '{0}'", tEnvPSeabath.REMARK2.ToString())); } //备注3 if (!String.IsNullOrEmpty(tEnvPSeabath.REMARK3.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND REMARK3 = '{0}'", tEnvPSeabath.REMARK3.ToString())); } //备注4 if (!String.IsNullOrEmpty(tEnvPSeabath.REMARK4.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND REMARK4 = '{0}'", tEnvPSeabath.REMARK4.ToString())); } //备注5 if (!String.IsNullOrEmpty(tEnvPSeabath.REMARK5.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND REMARK5 = '{0}'", tEnvPSeabath.REMARK5.ToString())); } } return(strWhereStatement.ToString()); }
/// <summary> /// 获得查询结果总行数,用于分页 /// </summary> /// <param name="tEnvPSeabath">对象</param> /// <returns>返回行数</returns> public int GetSelectResultCount(TEnvPSeabathVo tEnvPSeabath) { string strSQL = "select Count(*) from T_ENV_P_SEABATH " + this.BuildWhereStatement(tEnvPSeabath); return(Convert.ToInt32(SqlHelper.ExecuteScalar(strSQL))); }
/// <summary> /// 获取对象DataTable /// </summary> /// <param name="tEnvPSeabath">对象</param> /// <param name="iIndex">起始页码</param> /// <param name="iCount">每页数目</param> /// <returns>返回结果</returns> public DataTable SelectByTable(TEnvPSeabathVo tEnvPSeabath, int iIndex, int iCount) { return(access.SelectByTable(tEnvPSeabath, iIndex, iCount)); }
/// <summary> /// 根据对象获取全部数据,用Table承载 /// 数据量较小时使用【不推荐】 /// </summary> /// <param name="tEnvPSeabath"></param> /// <returns></returns> public DataTable SelectByTable(TEnvPSeabathVo tEnvPSeabath) { return(access.SelectByTable(tEnvPSeabath)); }
/// <summary> /// 对象明细 /// </summary> /// <param name="tEnvPSeabath">对象条件</param> /// <returns>对象</returns> public TEnvPSeabathVo Details(TEnvPSeabathVo tEnvPSeabath) { return(access.Details(tEnvPSeabath)); }
/// <summary> /// 获取对象List /// </summary> /// <param name="tEnvPSeabath">对象</param> /// <param name="iIndex">起始页码</param> /// <param name="iCount">每页数目</param> /// <returns>返回结果</returns> public List <TEnvPSeabathVo> SelectByObject(TEnvPSeabathVo tEnvPSeabath, int iIndex, int iCount) { return(access.SelectByObject(tEnvPSeabath, iIndex, iCount)); }
public TEnvPSeabathLogic(TEnvPSeabathVo _tEnvPSeabath) { tEnvPSeabath = _tEnvPSeabath; access = new TEnvPSeabathAccess(); }
/// <summary> /// 根据对象特征获取单一对象 /// </summary> /// <param name="tEnvPSeabath">对象</param> /// <returns></returns> public TEnvPSeabathVo SelectByObject(TEnvPSeabathVo tEnvPSeabath) { return(access.SelectByObject(tEnvPSeabath)); }
/// <summary> /// 对象编辑 /// </summary> /// <param name="tEnvPSeabath_UpdateSet">UpdateSet用户对象</param> /// <param name="tEnvPSeabath_UpdateWhere">UpdateWhere用户对象</param> /// <returns>是否成功</returns> public bool Edit(TEnvPSeabathVo tEnvPSeabath_UpdateSet, TEnvPSeabathVo tEnvPSeabath_UpdateWhere) { return(access.Edit(tEnvPSeabath_UpdateSet, tEnvPSeabath_UpdateWhere)); }
/// <summary> /// 对象删除 /// </summary> /// <param name="Id">ID</param> /// <returns>是否成功</returns> public bool Delete(TEnvPSeabathVo tEnvPSeabath) { return(access.Delete(tEnvPSeabath)); }
/// <summary> /// 对象明细 /// </summary> /// <param name="tEnvPSeabath">对象条件</param> /// <returns>对象</returns> public TEnvPSeabathVo Details(TEnvPSeabathVo tEnvPSeabath) { string strSQL = String.Format("select * from T_ENV_P_SEABATH " + this.BuildWhereStatement(tEnvPSeabath)); return(SqlHelper.ExecuteObject(new TEnvPSeabathVo(), strSQL)); }
/// <summary> /// 获取对象List /// </summary> /// <param name="tEnvPSeabath">对象</param> /// <param name="iIndex">起始页码</param> /// <param name="iCount">每页数目</param> /// <returns>返回结果</returns> public List <TEnvPSeabathVo> SelectByObject(TEnvPSeabathVo tEnvPSeabath, int iIndex, int iCount) { string strSQL = String.Format("select * from T_ENV_P_SEABATH " + this.BuildWhereStatement(tEnvPSeabath)); return(SqlHelper.ExecuteObjectList(tEnvPSeabath, BuildPagerExpress(strSQL, iIndex, iCount))); }
/// <summary> /// 对象添加 /// </summary> /// <param name="sysRole">对象</param> /// <returns>是否成功</returns> public bool Create(TEnvPSeabathVo tEnvPSeabath) { return(access.Create(tEnvPSeabath)); }
/// <summary> /// 根据对象获取全部数据,用Table承载 /// 数据量较小时使用【不推荐】 /// </summary> /// <param name="tEnvPSeabath"></param> /// <returns></returns> public DataTable SelectByTable(TEnvPSeabathVo tEnvPSeabath) { string strSQL = "select * from T_ENV_P_SEABATH " + this.BuildWhereStatement(tEnvPSeabath); return(SqlHelper.ExecuteDataTable(strSQL)); }
/// <summary> /// 获得查询结果总行数,用于分页 /// </summary> /// <param name="tEnvPSeabath">对象</param> /// <returns>返回行数</returns> public int GetSelectResultCount(TEnvPSeabathVo tEnvPSeabath) { return(access.GetSelectResultCount(tEnvPSeabath)); }
/// <summary> /// 对象添加(ljn.2013/6/14) /// </summary> /// <param name="sysRole">对象</param> /// <returns>是否成功</returns> public bool Create(TEnvPSeabathVo tEnvPSeabath, string Number) { return(access.Create(tEnvPSeabath, Number)); }
/// <summary> /// 根据对象特征获取单一对象 /// </summary> /// <param name="tEnvPSeabath">对象</param> /// <returns></returns> public TEnvPSeabathVo SelectByObject(TEnvPSeabathVo tEnvPSeabath) { string strSQL = "select * from T_ENV_P_SEABATH " + this.BuildWhereStatement(tEnvPSeabath); return(SqlHelper.ExecuteObject(new TEnvPSeabathVo(), strSQL)); }
/// <summary> /// 对象编辑 /// </summary> /// <param name="tEnvPSeabath">用户对象</param> /// <returns>是否成功</returns> public bool Edit(TEnvPSeabathVo tEnvPSeabath) { return(access.Edit(tEnvPSeabath)); }
/// <summary> /// 对象添加 /// </summary> /// <param name="tEnvPSeabath">对象</param> /// <returns>是否成功</returns> public bool Create(TEnvPSeabathVo tEnvPSeabath) { string strSQL = SqlHelper.BuildInsertExpress(tEnvPSeabath, TEnvPSeabathVo.T_ENV_P_SEABATH_TABLE); return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false); }