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

            strSQL += string.Format(" where ID='{0}' ", tMisContractAttfeeitem.ID);
            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Exemple #2
0
    public static string SaveData(string strID, string strAttFeeItem, string strPrice, string strInfo)
    {
        bool isSuccess = true;

        TMisContractAttfeeitemVo objFee = new TMisContractAttfeeitemVo();

        objFee.ID           = strID.Length > 0 ? strID : GetSerialNumber("t_mis_contract_attfeeitem_id");
        objFee.IS_DEL       = "0";
        objFee.ATT_FEE_ITEM = strAttFeeItem;
        objFee.PRICE        = strPrice;
        objFee.INFO         = strInfo;

        if (strID.Length > 0)
        {
            isSuccess = new TMisContractAttfeeitemLogic().Edit(objFee);
        }
        else
        {
            isSuccess = new TMisContractAttfeeitemLogic().Create(objFee);
        }

        if (isSuccess)
        {
            return("1");
        }
        else
        {
            return("0");
        }
    }
Exemple #3
0
    //获取信息
    private string getFee()
    {
        string strSortname  = Request.Params["sortname"];
        string strSortorder = Request.Params["sortorder"];
        //当前页面
        int intPageIndex = Convert.ToInt32(Request.Params["page"]);
        //每页记录数
        int intPageSize = Convert.ToInt32(Request.Params["pagesize"]);

        if (strSortname == null || strSortname.Length < 0)
        {
            strSortname = TMisContractAttfeeitemVo.ID_FIELD;
        }

        TMisContractAttfeeitemVo objFee = new TMisContractAttfeeitemVo();

        objFee.IS_DEL     = "0";
        objFee.SORT_FIELD = strSortname;
        objFee.SORT_TYPE  = strSortorder;
        DataTable dt            = new TMisContractAttfeeitemLogic().SelectByTable(objFee, intPageIndex, intPageSize);
        int       intTotalCount = new TMisContractAttfeeitemLogic().GetSelectResultCount(objFee);
        string    strJson       = CreateToJson(dt, intTotalCount);

        return(strJson);
    }
        /// <summary>
        /// 对象编辑
        /// </summary>
        /// <param name="tMisContractAttfeeitem_UpdateSet">UpdateSet用户对象</param>
        /// <param name="tMisContractAttfeeitem_UpdateWhere">UpdateWhere用户对象</param>
        /// <returns>是否成功</returns>
        public bool Edit(TMisContractAttfeeitemVo tMisContractAttfeeitem_UpdateSet, TMisContractAttfeeitemVo tMisContractAttfeeitem_UpdateWhere)
        {
            string strSQL = SqlHelper.BuildUpdateExpress(tMisContractAttfeeitem_UpdateSet, TMisContractAttfeeitemVo.T_MIS_CONTRACT_ATTFEEITEM_TABLE);

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

            strSQL = String.Format(strSQL, BuildWhereStatement(tMisContractAttfeeitem));
            return(SqlHelper.ExecuteDataTable(BuildPagerExpress(strSQL, iIndex, iCount)));
        }
        /// <summary>
        /// 根据对象构造条件语句
        /// </summary>
        /// <param name="tMisContractAttfeeitem"></param>
        /// <returns></returns>
        public string BuildWhereStatement(TMisContractAttfeeitemVo tMisContractAttfeeitem)
        {
            StringBuilder strWhereStatement = new StringBuilder(" Where 1=1 ");

            if (null != tMisContractAttfeeitem)
            {
                //
                if (!String.IsNullOrEmpty(tMisContractAttfeeitem.ID.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ID = '{0}'", tMisContractAttfeeitem.ID.ToString()));
                }
                //附加项目
                if (!String.IsNullOrEmpty(tMisContractAttfeeitem.ATT_FEE_ITEM.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND ATT_FEE_ITEM = '{0}'", tMisContractAttfeeitem.ATT_FEE_ITEM.ToString()));
                }
                //费用单价
                if (!String.IsNullOrEmpty(tMisContractAttfeeitem.PRICE.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND PRICE = '{0}'", tMisContractAttfeeitem.PRICE.ToString()));
                }
                //费用描述
                if (!String.IsNullOrEmpty(tMisContractAttfeeitem.INFO.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND INFO = '{0}'", tMisContractAttfeeitem.INFO.ToString()));
                }
                //删除标记
                if (!String.IsNullOrEmpty(tMisContractAttfeeitem.IS_DEL.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND IS_DEL = '{0}'", tMisContractAttfeeitem.IS_DEL.ToString()));
                }
                //备注1
                if (!String.IsNullOrEmpty(tMisContractAttfeeitem.REMARK1.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK1 = '{0}'", tMisContractAttfeeitem.REMARK1.ToString()));
                }
                //备注2
                if (!String.IsNullOrEmpty(tMisContractAttfeeitem.REMARK2.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK2 = '{0}'", tMisContractAttfeeitem.REMARK2.ToString()));
                }
                //备注3
                if (!String.IsNullOrEmpty(tMisContractAttfeeitem.REMARK3.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK3 = '{0}'", tMisContractAttfeeitem.REMARK3.ToString()));
                }
                //备注4
                if (!String.IsNullOrEmpty(tMisContractAttfeeitem.REMARK4.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK4 = '{0}'", tMisContractAttfeeitem.REMARK4.ToString()));
                }
                //备注5
                if (!String.IsNullOrEmpty(tMisContractAttfeeitem.REMARK5.ToString().Trim()))
                {
                    strWhereStatement.Append(string.Format(" AND REMARK5 = '{0}'", tMisContractAttfeeitem.REMARK5.ToString()));
                }
            }
            return(strWhereStatement.ToString());
        }
        /// <summary>
        /// 对象删除
        /// </summary>
        /// <param name="Id">ID</param>
        /// <returns>是否成功</returns>
        public bool Delete(TMisContractAttfeeitemVo tMisContractAttfeeitem)
        {
            string strSQL = "delete from T_MIS_CONTRACT_ATTFEEITEM ";

            strSQL += this.BuildWhereStatement(tMisContractAttfeeitem);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
Exemple #8
0
    public static string deleteData(string strValue)
    {
        TMisContractAttfeeitemVo objFee = new TMisContractAttfeeitemVo();

        objFee.ID     = strValue;
        objFee.IS_DEL = "1";
        bool isSuccess = new TMisContractAttfeeitemLogic().Edit(objFee);

        return(isSuccess == true ? "1" : "0");
    }
        /// <summary>
        /// 获取对象List
        /// </summary>
        /// <param name="tMisContractAttfeeitem">对象</param>
        /// <param name="iIndex">起始页码</param>
        /// <param name="iCount">每页数目</param>
        /// <returns>返回结果</returns>
        public List <TMisContractAttfeeitemVo> SelectByObject(TMisContractAttfeeitemVo tMisContractAttfeeitem, int iIndex, int iCount)
        {
            string strSQL = String.Format("select * from  T_MIS_CONTRACT_ATTFEEITEM " + this.BuildWhereStatement(tMisContractAttfeeitem));

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

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

            return(Convert.ToInt32(SqlHelper.ExecuteScalar(strSQL)));
        }
 public TMisContractAttfeeitemLogic(TMisContractAttfeeitemVo _tMisContractAttfeeitem)
 {
     tMisContractAttfeeitem = _tMisContractAttfeeitem;
     access = new TMisContractAttfeeitemAccess();
 }
        /// <summary>
        /// 对象添加
        /// </summary>
        /// <param name="tMisContractAttfeeitem">对象</param>
        /// <returns>是否成功</returns>
        public bool Create(TMisContractAttfeeitemVo tMisContractAttfeeitem)
        {
            string strSQL = SqlHelper.BuildInsertExpress(tMisContractAttfeeitem, TMisContractAttfeeitemVo.T_MIS_CONTRACT_ATTFEEITEM_TABLE);

            return(SqlHelper.ExecuteNonQuery(CommandType.Text, strSQL) > 0 ? true : false);
        }
 /// <summary>
 /// 获取对象DataTable
 /// </summary>
 /// <param name="tMisContractAttfeeitem">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public DataTable SelectByTable(TMisContractAttfeeitemVo tMisContractAttfeeitem, int iIndex, int iCount)
 {
     return(access.SelectByTable(tMisContractAttfeeitem, iIndex, iCount));
 }
 /// <summary>
 /// 根据对象获取全部数据,用Table承载
 ///  数据量较小时使用【不推荐】
 /// </summary>
 /// <param name="tMisContractAttfeeitem"></param>
 /// <returns></returns>
 public DataTable SelectByTable(TMisContractAttfeeitemVo tMisContractAttfeeitem)
 {
     return(access.SelectByTable(tMisContractAttfeeitem));
 }
 /// <summary>
 /// 获取对象List
 /// </summary>
 /// <param name="tMisContractAttfeeitem">对象</param>
 /// <param name="iIndex">起始页码</param>
 /// <param name="iCount">每页数目</param>
 /// <returns>返回结果</returns>
 public List <TMisContractAttfeeitemVo> SelectByObject(TMisContractAttfeeitemVo tMisContractAttfeeitem, int iIndex, int iCount)
 {
     return(access.SelectByObject(tMisContractAttfeeitem, iIndex, iCount));
 }
 /// <summary>
 /// 对象明细
 /// </summary>
 /// <param name="tMisContractAttfeeitem">对象条件</param>
 /// <returns>对象</returns>
 public TMisContractAttfeeitemVo Details(TMisContractAttfeeitemVo tMisContractAttfeeitem)
 {
     return(access.Details(tMisContractAttfeeitem));
 }
 /// <summary>
 /// 获得查询结果总行数,用于分页
 /// </summary>
 /// <param name="tMisContractAttfeeitem">对象</param>
 /// <returns>返回行数</returns>
 public int GetSelectResultCount(TMisContractAttfeeitemVo tMisContractAttfeeitem)
 {
     return(access.GetSelectResultCount(tMisContractAttfeeitem));
 }
        /// <summary>
        /// 根据对象获取全部数据,用Table承载
        ///  数据量较小时使用【不推荐】
        /// </summary>
        /// <param name="tMisContractAttfeeitem"></param>
        /// <returns></returns>
        public DataTable SelectByTable(TMisContractAttfeeitemVo tMisContractAttfeeitem)
        {
            string strSQL = "select * from T_MIS_CONTRACT_ATTFEEITEM " + this.BuildWhereStatement(tMisContractAttfeeitem);

            return(SqlHelper.ExecuteDataTable(strSQL));
        }
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tMisContractAttfeeitem_UpdateSet">UpdateSet用户对象</param>
 /// <param name="tMisContractAttfeeitem_UpdateWhere">UpdateWhere用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TMisContractAttfeeitemVo tMisContractAttfeeitem_UpdateSet, TMisContractAttfeeitemVo tMisContractAttfeeitem_UpdateWhere)
 {
     return(access.Edit(tMisContractAttfeeitem_UpdateSet, tMisContractAttfeeitem_UpdateWhere));
 }
 /// <summary>
 /// 对象添加
 /// </summary>
 /// <param name="sysRole">对象</param>
 /// <returns>是否成功</returns>
 public bool Create(TMisContractAttfeeitemVo tMisContractAttfeeitem)
 {
     return(access.Create(tMisContractAttfeeitem));
 }
 /// <summary>
 /// 对象删除
 /// </summary>
 /// <param name="Id">ID</param>
 /// <returns>是否成功</returns>
 public bool Delete(TMisContractAttfeeitemVo tMisContractAttfeeitem)
 {
     return(access.Delete(tMisContractAttfeeitem));
 }
 /// <summary>
 /// 根据对象特征获取单一对象
 /// </summary>
 /// <param name="tMisContractAttfeeitem">对象</param>
 /// <returns></returns>
 public TMisContractAttfeeitemVo SelectByObject(TMisContractAttfeeitemVo tMisContractAttfeeitem)
 {
     return(access.SelectByObject(tMisContractAttfeeitem));
 }
 /// <summary>
 /// 对象编辑
 /// </summary>
 /// <param name="tMisContractAttfeeitem">用户对象</param>
 /// <returns>是否成功</returns>
 public bool Edit(TMisContractAttfeeitemVo tMisContractAttfeeitem)
 {
     return(access.Edit(tMisContractAttfeeitem));
 }