コード例 #1
0
        public Dictionary <int, DefaultCardOut> GetAllDefaultCardOuts(ref string errMessage)
        {
            Database db = DatabaseFactory.CreateDatabase();

            errMessage = "";
            Dictionary <int, DefaultCardOut> list = new Dictionary <int, DefaultCardOut>();

            try
            {
                DataSet ds = DefaultCardOutDataAccess.GetAllDefaultCardOuts(db);

                DefaultCardOut defaultCardOut;
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    defaultCardOut = new DefaultCardOut(ds.Tables[0].Rows[i]);
                    list.Add(defaultCardOut.Id, defaultCardOut);
                }
                return(list);
            }
            catch (Exception ex)
            {
                errMessage = ex.Message + ex.StackTrace;
                logger.Error("Error Message:" + ex.Message + " Trace:" + ex.StackTrace);
                return(null);
            }
        }