Exemplo n.º 1
0
        public Int32 UpdatePersonBaseFeeDepartmentProjectInfo(PersonBaseFeeDepartmentProjectInfo PersonBaseFeeDepartmentProjectInfo)
        {
            String sql    = ORMapping.GetUpdateSql(PersonBaseFeeDepartmentProjectInfo, BuilderEx.TSqlBuilderInstance);
            int    result = _DataHelper.ExecuteSql(sql);

            return(result);
        }
Exemplo n.º 2
0
        public List <PersonBaseFeeDepartmentProjectInfo> GetPersonBaseFeeDepartmentProjectInfoList(String yearMonth, WhereSqlClauseBuilder builder)
        {
            String sql = String.Format("SELECT * FROM {0} WHERE {1} "
                                       , String.IsNullOrEmpty(yearMonth) ? PersonBaseFeeDepartmentProjectInfoDBConst.TableName : ORMapping.GetMappingInfo <PersonBaseFeeDepartmentProjectMonthInfo>().TableName
                                       , builder.ToSqlString());
            DataTable dt = _DataHelper.GetDataTable(sql);
            List <PersonBaseFeeDepartmentProjectInfo> result = new List <PersonBaseFeeDepartmentProjectInfo>();

            for (Int32 i = 0; i < dt.Rows.Count; i++)
            {
                PersonBaseFeeDepartmentProjectInfo info = String.IsNullOrEmpty(yearMonth) ? new PersonBaseFeeDepartmentProjectInfo() : new PersonBaseFeeDepartmentProjectMonthInfo();
                ORMapping.DataRowToObject(dt.Rows[i], info);
                result.Add(info);
            }
            return(result);
        }