Beispiel #1
0
 /// <summary>
 /// 功能:执行普通的SQL语句
 /// </summary>
 public void ExcuteSql(String sql)
 {
     try
     {
         Tb_PL_Month_DetailDA da1 = new Tb_PL_Month_DetailDA();
         da1.ExcuteSql(sql);
     }
     catch (Exception err)
     {
         this.ErrorInfo = err.Message.Replace("\r", "").Replace("\t", "").Replace("\n", "");
     }
 }
Beispiel #2
0
 /// <summary>
 /// 根据条件,修改一个数据
 /// </summary>
 /// <param name="condition">修改数据的条件</param>
 /// <param name="data1">新的数据</param>
 public void EditData(List <SearchField> condition, Dictionary <String, object> data1)
 {
     try
     {
         Tb_PL_Month_DetailDA da1 = new Tb_PL_Month_DetailDA();
         da1.EditData(condition, data1);
         this.executeResultCount = da1.ExecuteResultCount;
     }
     catch (Exception err)
     {
         this.ErrorInfo = err.Message.Replace("\r", "").Replace("\t", "").Replace("\n", "");
     }
 }
Beispiel #3
0
 /// <summary>
 /// 根据条件删除数据
 /// </summary>
 /// <param name="condition">删除数据条件</param>
 public void DeleteData(List <SearchField> condition)
 {
     try
     {
         Tb_PL_Month_DetailDA da1 = new Tb_PL_Month_DetailDA();
         da1.DeleteData(condition);
         this.executeResultCount = da1.ExecuteResultCount;
     }
     catch (Exception err)
     {
         this.ErrorInfo = err.Message.Replace("\r", "").Replace("\t", "").Replace("\n", "");
     }
 }
Beispiel #4
0
 /// <summary>
 /// 新增一条数据
 /// </summary>
 /// <param name="data1">Dictionary数据</param>
 public void NewData(Dictionary <String, object> data1)
 {
     try
     {
         Tb_PL_Month_DetailDA da1 = new Tb_PL_Month_DetailDA();
         da1.NewData(data1);
         this.executeResultCount = da1.ExecuteResultCount;
     }
     catch (Exception err)
     {
         this.ErrorInfo = err.Message.Replace("\r", "").Replace("\t", "").Replace("\n", "");
     }
 }
Beispiel #5
0
        /// <summary>
        /// 判断是否有符合条件的数据
        /// </summary>
        ///<param name="condition">查询条件</param>
        /// <returns></returns>
        public bool HasData(List <SearchField> condition)
        {
            bool result = false;

            try
            {
                Tb_PL_Month_DetailDA da1 = new Tb_PL_Month_DetailDA();
                result = da1.HasData(condition);
            }
            catch (Exception err)
            {
                this.ErrorInfo = err.Message.Replace("\r", "").Replace("\t", "").Replace("\n", "");
            }
            return(result);
        }
Beispiel #6
0
        /// <summary>
        /// 得到满足条件的第一行数据(返回值为Dictionary)
        /// </summary>
        /// <param name="condition">查询条件</param>
        /// <param name="Fields">数据字段</param>
        /// <returns>Dictionary字典</returns>
        public Dictionary <string, object> GetFirstDictionary(List <SearchField> condition, params String[] Fields)
        {
            Dictionary <string, object> data1 = null;

            try
            {
                Tb_PL_Month_DetailDA da1 = new Tb_PL_Month_DetailDA();
                data1 = da1.GetFirstDictionary(condition, Fields);
                this.executeResultCount = da1.ExecuteResultCount;
            }
            catch (Exception err)
            {
                this.ErrorInfo = err.Message.Replace("\r", "").Replace("\t", "").Replace("\n", "");
            }
            return(data1);
        }
Beispiel #7
0
        /// <summary>
        /// 根据条件得到列表数据
        /// </summary>
        /// <param name="condition">查询条件</param>
        /// <param name="PageSize">页大小</param>
        /// <param name="CurPage">当前页</param>
        /// <param name="Fields">数据字段</param>
        /// <param name="orderBy">排序表达式</param>
        /// <param name="TotalRow">数据总行数</param>
        /// <param name="Fields">要显示的字段</param>
        /// <returns>列表数据</returns>
        public DataTable GetListData(List <SearchField> condition,
                                     int PageSize, int CurPage, String orderBy,
                                     out int TotalRow, params String[] Fields)
        {
            TotalRow = 0;
            DataTable dt1 = null;

            try
            {
                Tb_PL_Month_DetailDA da1 = new Tb_PL_Month_DetailDA();
                dt1 = da1.GetListData(condition, PageSize, CurPage, orderBy, out TotalRow, Fields);
                this.executeResultCount = da1.ExecuteResultCount;
                return(dt1);
            }
            catch (Exception err)
            {
                this.ErrorInfo = err.Message.Replace("\r", "").Replace("\t", "").Replace("\n", "");
            }
            return(dt1);
        }