示例#1
0
        //public static int LoadBoxscore(CoversBoxscore oCoversBoxscore, SeasonInfoDTO oSeasonInfoDTO)
        //{

        //   return 0;
        //}
        static void InsertRowPrep(string TableName, string ColumnNames, object DTO, PopulateDTOValues delPopulateDTOValues)
        {
            List <string> ocColumns = ColumnNames.Split(',').OfType <string>().ToList();
            List <string> ocValues  = new List <string>();

            delPopulateDTOValues(ocValues, DTO); // Execute Delegate
            string ConnectionString = SqlFunctions.GetConnectionString();
            string SQL = SysDAL.DALfunctions.GenSql(TableName, ocColumns);
            int    rc  = SysDAL.DALfunctions.InsertRow(ConnectionString, SQL, ocColumns, ocValues);
        }
示例#2
0
        public static int DALInsertRow(string TableName, string ColumnNames, object DTO, PopulateDTOValues delegatePopulateDTOValues, string ConnectionString)
        {
            List <string> ocColumns = ColumnNames.Split(',').OfType <string>().ToList();
            List <string> ocValues  = new List <string>();

            delegatePopulateDTOValues(ocValues, DTO);                      // Execute Delegate to Populate ocValues from DTO
            string SQL = SysDAL.DALfunctions.GenSql(TableName, ocColumns); // Gen INSERT SQL from
            int    rc  = SysDAL.DALfunctions.InsertRow(ConnectionString, SQL, ocColumns, ocValues);

            return(rc);
        }