/// <summary> /// 获取对象DataTable /// </summary> /// <param name="tEnvPRiverTarget">对象</param> /// <param name="iIndex">起始页码</param> /// <param name="iCount">每页数目</param> /// <returns>返回结果</returns> public DataTable SelectByTable(TEnvPRiverTargetVo tEnvPRiverTarget, int iIndex, int iCount) { string strSQL = " select * from T_ENV_P_RIVER_TARGET {0} "; strSQL = String.Format(strSQL, BuildWhereStatement(tEnvPRiverTarget)); return(SqlHelper.ExecuteDataTable(BuildPagerExpress(strSQL, iIndex, iCount))); }
/// <summary> /// 对象编辑 /// </summary> /// <param name="tEnvPRiverTarget_UpdateSet">UpdateSet用户对象</param> /// <param name="tEnvPRiverTarget_UpdateWhere">UpdateWhere用户对象</param> /// <returns>是否成功</returns> public bool Edit(TEnvPRiverTargetVo tEnvPRiverTarget_UpdateSet, TEnvPRiverTargetVo tEnvPRiverTarget_UpdateWhere) { string strSQL = SqlHelper.BuildUpdateExpress(tEnvPRiverTarget_UpdateSet, TEnvPRiverTargetVo.T_ENV_P_RIVER_TARGET_TABLE); strSQL += this.BuildWhereStatement(tEnvPRiverTarget_UpdateWhere); return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false); }
/// <summary> /// 增加数据 /// </summary> /// <returns></returns> public string frmAdd() { TEnvPRiverTargetVo TEnvPRiverTarget = autoBindRequest(Request, new TEnvPRiverTargetVo()); TEnvPRiverTarget.IS_DEL = "0"; string strMsg = ""; bool isSuccess = false; //验证数据是否重复 strMsg = new CommonLogic().isExistDatas(TEnvPRiverTargetVo.T_ENV_P_RIVER_TARGET_TABLE, TEnvPRiverTarget.YEAR, TEnvPRiverTarget.SelectMonths, TEnvPRiverTargetVo.SECTION_NAME_FIELD, TEnvPRiverTarget.SECTION_NAME, TEnvPRiverTargetVo.SECTION_CODE_FIELD, TEnvPRiverTarget.SECTION_CODE, TEnvPRiverTargetVo.ID_FIELD, TEnvPRiverTarget.ID, 0); if (strMsg == "") { isSuccess = new TEnvPRiverTargetLogic().Create(TEnvPRiverTarget, SerialType.T_ENV_P_RIVER_TARGET); if (isSuccess) { WriteLog("添加责任目标断面信息", "", LogInfo.UserInfo.USER_NAME + "添加责任目标断面信息" + TEnvPRiverTarget.ID); strMsg = "数据保存成功"; } else { strMsg = "数据保存失败"; } } return(isSuccess == true ? "{\"result\":\"success\",\"msg\":\"" + strMsg + "\"}" : "{\"result\":\"fail\",\"msg\":\"" + strMsg + "\"}"); }
/// <summary> /// 修改数据 /// </summary> /// <returns></returns> public string frmUpdate() { TEnvPRiverTargetVo TEnvPRiverTarget = autoBindRequest(Request, new TEnvPRiverTargetVo()); TEnvPRiverTarget.ID = Request["id"].ToString(); TEnvPRiverTarget.IS_DEL = "0"; string strMsg = ""; bool isSuccess = false; if (hidYear.Value.Trim() != TEnvPRiverTarget.YEAR || hidMonth.Value.Trim() != TEnvPRiverTarget.MONTH || hidValue.Value.Trim() != TEnvPRiverTarget.SECTION_NAME || hidCode.Value.Trim() != TEnvPRiverTarget.SECTION_CODE) { //验证数据是否重复 strMsg = new CommonLogic().isExistDatas(TEnvPRiverTargetVo.T_ENV_P_RIVER_TARGET_TABLE, TEnvPRiverTarget.YEAR, TEnvPRiverTarget.MONTH, TEnvPRiverTargetVo.SECTION_NAME_FIELD, TEnvPRiverTarget.SECTION_NAME, TEnvPRiverTargetVo.SECTION_CODE_FIELD, TEnvPRiverTarget.SECTION_CODE, TEnvPRiverTargetVo.ID_FIELD, TEnvPRiverTarget.ID, 0); } if (strMsg == "") { isSuccess = new TEnvPRiverTargetLogic().Edit(TEnvPRiverTarget); if (isSuccess) { WriteLog("编辑责任目标断面监测点", "", LogInfo.UserInfo.USER_NAME + "编辑责任目标断面监测点" + TEnvPRiverTarget.ID); strMsg = "数据更新成功"; } else { strMsg = "数据更新失败"; } } return(isSuccess == true ? "{\"result\":\"success\",\"msg\":\"" + strMsg + "\"}" : "{\"result\":\"fail\",\"msg\":\"" + strMsg + "\"}"); }
/// <summary> /// 对象编辑 /// </summary> /// <param name="tEnvPRiverTarget">用户对象</param> /// <returns>是否成功</returns> public bool Edit(TEnvPRiverTargetVo tEnvPRiverTarget) { string strSQL = SqlHelper.BuildUpdateExpress(tEnvPRiverTarget, TEnvPRiverTargetVo.T_ENV_P_RIVER_TARGET_TABLE); strSQL += string.Format(" where ID='{0}' ", tEnvPRiverTarget.ID); return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false); }
/// <summary> /// 加载数据 /// </summary> /// <returns></returns> public string frmLoadData() { TEnvPRiverTargetVo TEnvPRiverTargetVo = new TEnvPRiverTargetVo(); TEnvPRiverTargetVo.ID = Request["id"].ToString(); TEnvPRiverTargetVo.IS_DEL = "0"; TEnvPRiverTargetVo TEnvPRiverTargetVoTemp = new TEnvPRiverTargetLogic().Details(TEnvPRiverTargetVo); //条件项ID string strConditionId = TEnvPRiverTargetVoTemp.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; string strStanderName = new i3.BusinessLogic.Channels.Base.Evaluation.TBaseEvaluationInfoLogic().Details(strConditionId).STANDARD_NAME; TEnvPRiverTargetVoTemp.REMARK1 = strStanderName; //获取流域名称 string strValley = new i3.BusinessLogic.Sys.Resource.TSysDictLogic().Details(TEnvPRiverTargetVoTemp.VALLEY_ID).DICT_TEXT; TEnvPRiverTargetVoTemp.REMARK2 = strValley; //获取河流名称 string strRiver = new i3.BusinessLogic.Sys.Resource.TSysDictLogic().Details(TEnvPRiverTargetVoTemp.RIVER_ID).DICT_TEXT; TEnvPRiverTargetVoTemp.REMARK3 = strRiver; return(ToJson(TEnvPRiverTargetVoTemp)); }
/// <summary> /// 对象删除 /// </summary> /// <param name="Id">ID</param> /// <returns>是否成功</returns> public bool Delete(TEnvPRiverTargetVo tEnvPRiverTarget) { string strSQL = "delete from T_ENV_P_RIVER_TARGET "; strSQL += this.BuildWhereStatement(tEnvPRiverTarget); return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false); }
public static string deleteOneGridInfo(string strValue) { TEnvPRiverTargetVo TEnvPRiverTarget = new TEnvPRiverTargetVo(); TEnvPRiverTarget.ID = strValue; TEnvPRiverTarget.IS_DEL = "1"; bool isSuccess = new TEnvPRiverTargetLogic().Edit(TEnvPRiverTarget); if (isSuccess) { new PageBase().WriteLog("删除责任目标断面监测点", "", new UserLogInfo().UserInfo.USER_NAME + "删除责任目标断面监测点" + TEnvPRiverTarget.ID); } return(isSuccess == true ? "1" : "0"); }
/// <summary> /// 对象添加 /// </summary> /// <param name="tEnvPDrinkSrc">对象</param> /// <param name="strSerial">序列类型</param> /// <returns>是否成功</returns> public bool Create(TEnvPRiverTargetVo TEnvPRiverTarget, string strSerial) { ArrayList list = new ArrayList(); string strSQL = string.Empty; List <string> values = TEnvPRiverTarget.SelectMonths.Split(';').ToList(); TEnvPRiverTarget.SelectMonths = ""; foreach (string valueTemp in values) { TEnvPRiverTarget.ID = GetSerialNumber(strSerial); TEnvPRiverTarget.MONTH = valueTemp; strSQL = SqlHelper.BuildInsertExpress(TEnvPRiverTarget, TEnvPRiverTargetVo.T_ENV_P_RIVER_TARGET_TABLE); list.Add(strSQL); } return(SqlHelper.ExecuteSQLByTransaction(list)); }
/// <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"]); TEnvPRiverTargetVo TEnvPRiverTarget = new TEnvPRiverTargetVo(); TEnvPRiverTarget.IS_DEL = "0"; TEnvPRiverTarget.SORT_FIELD = strSortname; TEnvPRiverTarget.SORT_TYPE = strSortorder; DataTable dt = new DataTable(); int intTotalCount = 0; if (!String.IsNullOrEmpty(srhYear) || !String.IsNullOrEmpty(srhMonth) || !String.IsNullOrEmpty(srhName) || !String.IsNullOrEmpty(srhArea)) { TEnvPRiverTarget.YEAR = srhYear; TEnvPRiverTarget.MONTH = srhMonth; TEnvPRiverTarget.SECTION_NAME = srhName; TEnvPRiverTarget.AREA_ID = srhArea; dt = new TEnvPRiverTargetLogic().SelectByTable(TEnvPRiverTarget, intPageIndex, intPageSize); intTotalCount = new TEnvPRiverTargetLogic().GetSelectResultCount(TEnvPRiverTarget); } else { dt = new TEnvPRiverTargetLogic().SelectByTable(TEnvPRiverTarget, intPageIndex, intPageSize); intTotalCount = new TEnvPRiverTargetLogic().GetSelectResultCount(TEnvPRiverTarget); } string strJson = CreateToJson(dt, intTotalCount); return(strJson); }
/// <summary> /// 对象编辑 /// </summary> /// <param name="tEnvPRiverTarget">用户对象</param> /// <returns>是否成功</returns> public bool Edit(TEnvPRiverTargetVo tEnvPRiverTarget) { return(access.Edit(tEnvPRiverTarget)); }
/// <summary> /// 获取对象List /// </summary> /// <param name="tEnvPRiverTarget">对象</param> /// <param name="iIndex">起始页码</param> /// <param name="iCount">每页数目</param> /// <returns>返回结果</returns> public List <TEnvPRiverTargetVo> SelectByObject(TEnvPRiverTargetVo tEnvPRiverTarget, int iIndex, int iCount) { string strSQL = String.Format("select * from T_ENV_P_RIVER_TARGET " + this.BuildWhereStatement(tEnvPRiverTarget)); return(SqlHelper.ExecuteObjectList(tEnvPRiverTarget, BuildPagerExpress(strSQL, iIndex, iCount))); }
/// <summary> /// 对象明细 /// </summary> /// <param name="tEnvPRiverTarget">对象条件</param> /// <returns>对象</returns> public TEnvPRiverTargetVo Details(TEnvPRiverTargetVo tEnvPRiverTarget) { string strSQL = String.Format("select * from T_ENV_P_RIVER_TARGET " + this.BuildWhereStatement(tEnvPRiverTarget)); return(SqlHelper.ExecuteObject(new TEnvPRiverTargetVo(), strSQL)); }
/// <summary> /// 获得查询结果总行数,用于分页 /// </summary> /// <param name="tEnvPRiverTarget">对象</param> /// <returns>返回行数</returns> public int GetSelectResultCount(TEnvPRiverTargetVo tEnvPRiverTarget) { string strSQL = "select Count(*) from T_ENV_P_RIVER_TARGET " + this.BuildWhereStatement(tEnvPRiverTarget); return(Convert.ToInt32(SqlHelper.ExecuteScalar(strSQL))); }
/// <summary> /// 获得查询结果总行数,用于分页 /// </summary> /// <param name="tEnvPRiverTarget">对象</param> /// <returns>返回行数</returns> public int GetSelectResultCount(TEnvPRiverTargetVo tEnvPRiverTarget) { return(access.GetSelectResultCount(tEnvPRiverTarget)); }
/// <summary> /// 根据对象特征获取单一对象 /// </summary> /// <param name="tEnvPRiverTarget">对象</param> /// <returns></returns> public TEnvPRiverTargetVo SelectByObject(TEnvPRiverTargetVo tEnvPRiverTarget) { return(access.SelectByObject(tEnvPRiverTarget)); }
/// <summary> /// 对象删除 /// </summary> /// <param name="Id">ID</param> /// <returns>是否成功</returns> public bool Delete(TEnvPRiverTargetVo tEnvPRiverTarget) { return(access.Delete(tEnvPRiverTarget)); }
public TEnvPRiverTargetLogic(TEnvPRiverTargetVo _tEnvPRiverTarget) { tEnvPRiverTarget = _tEnvPRiverTarget; access = new TEnvPRiverTargetAccess(); }
/// <summary> /// 根据对象获取全部数据,用Table承载 /// 数据量较小时使用【不推荐】 /// </summary> /// <param name="tEnvPRiverTarget"></param> /// <returns></returns> public DataTable SelectByTable(TEnvPRiverTargetVo tEnvPRiverTarget) { return(access.SelectByTable(tEnvPRiverTarget)); }
/// <summary> /// 获取对象DataTable /// </summary> /// <param name="tEnvPRiverTarget">对象</param> /// <param name="iIndex">起始页码</param> /// <param name="iCount">每页数目</param> /// <returns>返回结果</returns> public DataTable SelectByTable(TEnvPRiverTargetVo tEnvPRiverTarget, int iIndex, int iCount) { return(access.SelectByTable(tEnvPRiverTarget, iIndex, iCount)); }
/// <summary> /// 获取对象List /// </summary> /// <param name="tEnvPRiverTarget">对象</param> /// <param name="iIndex">起始页码</param> /// <param name="iCount">每页数目</param> /// <returns>返回结果</returns> public List <TEnvPRiverTargetVo> SelectByObject(TEnvPRiverTargetVo tEnvPRiverTarget, int iIndex, int iCount) { return(access.SelectByObject(tEnvPRiverTarget, iIndex, iCount)); }
/// <summary> /// 对象明细 /// </summary> /// <param name="tEnvPRiverTarget">对象条件</param> /// <returns>对象</returns> public TEnvPRiverTargetVo Details(TEnvPRiverTargetVo tEnvPRiverTarget) { return(access.Details(tEnvPRiverTarget)); }
/// <summary> /// 根据对象获取全部数据,用Table承载 /// 数据量较小时使用【不推荐】 /// </summary> /// <param name="tEnvPRiverTarget"></param> /// <returns></returns> public DataTable SelectByTable(TEnvPRiverTargetVo tEnvPRiverTarget) { string strSQL = "select * from T_ENV_P_RIVER_TARGET " + this.BuildWhereStatement(tEnvPRiverTarget); return(SqlHelper.ExecuteDataTable(strSQL)); }
/// <summary> /// 对象编辑 /// </summary> /// <param name="tEnvPRiverTarget_UpdateSet">UpdateSet用户对象</param> /// <param name="tEnvPRiverTarget_UpdateWhere">UpdateWhere用户对象</param> /// <returns>是否成功</returns> public bool Edit(TEnvPRiverTargetVo tEnvPRiverTarget_UpdateSet, TEnvPRiverTargetVo tEnvPRiverTarget_UpdateWhere) { return(access.Edit(tEnvPRiverTarget_UpdateSet, tEnvPRiverTarget_UpdateWhere)); }
/// <summary> /// 对象添加 /// </summary> /// <param name="sysRole">对象</param> /// <returns>是否成功</returns> public bool Create(TEnvPRiverTargetVo tEnvPRiverTarget) { return(access.Create(tEnvPRiverTarget)); }
/// <summary> /// 根据对象构造条件语句 /// </summary> /// <param name="tEnvPRiverTarget"></param> /// <returns></returns> public string BuildWhereStatement(TEnvPRiverTargetVo tEnvPRiverTarget) { StringBuilder strWhereStatement = new StringBuilder(" Where 1=1 "); if (null != tEnvPRiverTarget) { //主键ID if (!String.IsNullOrEmpty(tEnvPRiverTarget.ID.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND ID = '{0}'", tEnvPRiverTarget.ID.ToString())); } //年度 if (!String.IsNullOrEmpty(tEnvPRiverTarget.YEAR.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND YEAR = '{0}'", tEnvPRiverTarget.YEAR.ToString())); } //月度 if (!String.IsNullOrEmpty(tEnvPRiverTarget.MONTH.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND MONTH = '{0}'", tEnvPRiverTarget.MONTH.ToString())); } //测站ID(字典项) if (!String.IsNullOrEmpty(tEnvPRiverTarget.SATAIONS_ID.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND SATAIONS_ID = '{0}'", tEnvPRiverTarget.SATAIONS_ID.ToString())); } //断面代码 if (!String.IsNullOrEmpty(tEnvPRiverTarget.SECTION_CODE.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND SECTION_CODE = '{0}'", tEnvPRiverTarget.SECTION_CODE.ToString())); } //断面名称 if (!String.IsNullOrEmpty(tEnvPRiverTarget.SECTION_NAME.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND SECTION_NAME = '{0}'", tEnvPRiverTarget.SECTION_NAME.ToString())); } //所在地区ID(字典项) if (!String.IsNullOrEmpty(tEnvPRiverTarget.AREA_ID.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND AREA_ID = '{0}'", tEnvPRiverTarget.AREA_ID.ToString())); } //所属省份ID(字典项) if (!String.IsNullOrEmpty(tEnvPRiverTarget.PROVINCE_ID.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND PROVINCE_ID = '{0}'", tEnvPRiverTarget.PROVINCE_ID.ToString())); } //控制级别ID(字典项) if (!String.IsNullOrEmpty(tEnvPRiverTarget.CONTRAL_LEVEL.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND CONTRAL_LEVEL = '{0}'", tEnvPRiverTarget.CONTRAL_LEVEL.ToString())); } //河流ID(字典项) if (!String.IsNullOrEmpty(tEnvPRiverTarget.RIVER_ID.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND RIVER_ID = '{0}'", tEnvPRiverTarget.RIVER_ID.ToString())); } //流域ID(字典项) if (!String.IsNullOrEmpty(tEnvPRiverTarget.VALLEY_ID.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND VALLEY_ID = '{0}'", tEnvPRiverTarget.VALLEY_ID.ToString())); } //水质目标ID(字典项) if (!String.IsNullOrEmpty(tEnvPRiverTarget.WATER_QUALITY_GOALS_ID.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND WATER_QUALITY_GOALS_ID = '{0}'", tEnvPRiverTarget.WATER_QUALITY_GOALS_ID.ToString())); } //每月监测、单月监测 if (!String.IsNullOrEmpty(tEnvPRiverTarget.MONITOR_TIMES.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND MONITOR_TIMES = '{0}'", tEnvPRiverTarget.MONITOR_TIMES.ToString())); } //类别ID(字典项) if (!String.IsNullOrEmpty(tEnvPRiverTarget.CATEGORY_ID.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND CATEGORY_ID = '{0}'", tEnvPRiverTarget.CATEGORY_ID.ToString())); } //是否交接(0-否,1-是) if (!String.IsNullOrEmpty(tEnvPRiverTarget.IS_HANDOVER.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND IS_HANDOVER = '{0}'", tEnvPRiverTarget.IS_HANDOVER.ToString())); } //经度(度) if (!String.IsNullOrEmpty(tEnvPRiverTarget.LONGITUDE_DEGREE.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND LONGITUDE_DEGREE = '{0}'", tEnvPRiverTarget.LONGITUDE_DEGREE.ToString())); } //经度(分) if (!String.IsNullOrEmpty(tEnvPRiverTarget.LONGITUDE_MINUTE.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND LONGITUDE_MINUTE = '{0}'", tEnvPRiverTarget.LONGITUDE_MINUTE.ToString())); } //经度(秒) if (!String.IsNullOrEmpty(tEnvPRiverTarget.LONGITUDE_SECOND.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND LONGITUDE_SECOND = '{0}'", tEnvPRiverTarget.LONGITUDE_SECOND.ToString())); } //纬度(度) if (!String.IsNullOrEmpty(tEnvPRiverTarget.LATITUDE_DEGREE.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND LATITUDE_DEGREE = '{0}'", tEnvPRiverTarget.LATITUDE_DEGREE.ToString())); } //纬度(分) if (!String.IsNullOrEmpty(tEnvPRiverTarget.LATITUDE_MINUTE.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND LATITUDE_MINUTE = '{0}'", tEnvPRiverTarget.LATITUDE_MINUTE.ToString())); } //纬度(秒) if (!String.IsNullOrEmpty(tEnvPRiverTarget.LATITUDE_SECOND.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND LATITUDE_SECOND = '{0}'", tEnvPRiverTarget.LATITUDE_SECOND.ToString())); } //条件项 if (!String.IsNullOrEmpty(tEnvPRiverTarget.CONDITION_ID.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND CONDITION_ID = '{0}'", tEnvPRiverTarget.CONDITION_ID.ToString())); } //删除标记 if (!String.IsNullOrEmpty(tEnvPRiverTarget.IS_DEL.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND IS_DEL = '{0}'", tEnvPRiverTarget.IS_DEL.ToString())); } //断面性质 if (!String.IsNullOrEmpty(tEnvPRiverTarget.SECTION_PORPERTIES_ID.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND SECTION_PORPERTIES_ID = '{0}'", tEnvPRiverTarget.SECTION_PORPERTIES_ID.ToString())); } //序号 if (!String.IsNullOrEmpty(tEnvPRiverTarget.NUM.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND NUM = '{0}'", tEnvPRiverTarget.NUM.ToString())); } //备注1 if (!String.IsNullOrEmpty(tEnvPRiverTarget.REMARK1.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND REMARK1 = '{0}'", tEnvPRiverTarget.REMARK1.ToString())); } //备注2 if (!String.IsNullOrEmpty(tEnvPRiverTarget.REMARK2.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND REMARK2 = '{0}'", tEnvPRiverTarget.REMARK2.ToString())); } //备注3 if (!String.IsNullOrEmpty(tEnvPRiverTarget.REMARK3.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND REMARK3 = '{0}'", tEnvPRiverTarget.REMARK3.ToString())); } //备注4 if (!String.IsNullOrEmpty(tEnvPRiverTarget.REMARK4.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND REMARK4 = '{0}'", tEnvPRiverTarget.REMARK4.ToString())); } //备注5 if (!String.IsNullOrEmpty(tEnvPRiverTarget.REMARK5.ToString().Trim())) { strWhereStatement.Append(string.Format(" AND REMARK5 = '{0}'", tEnvPRiverTarget.REMARK5.ToString())); } } return(strWhereStatement.ToString()); }
/// <summary> /// 对象添加 /// </summary> /// <param name="tEnvPRiverTarget">对象</param> /// <returns>是否成功</returns> public bool Create(TEnvPRiverTargetVo tEnvPRiverTarget) { string strSQL = SqlHelper.BuildInsertExpress(tEnvPRiverTarget, TEnvPRiverTargetVo.T_ENV_P_RIVER_TARGET_TABLE); return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false); }
/// <summary> /// 对象添加 /// </summary> /// <param name="sysRole">对象</param> /// <returns>是否成功</returns> public bool Create(TEnvPRiverTargetVo TEnvPRiverTarget, string strSerial) { return(access.Create(TEnvPRiverTarget, strSerial)); }