Exemple #1
0
        public void Save(DataSet ds)
        {
            objDARooms = new DATrainingRooms();
            DACultureResources oDACr = new DACultureResources();

            using (DbTransaction transaction = objDARooms.CreateTransaction())
            {
                try
                {
                    DataTable dtRoom = ds.Tables[Entities.TrainingRooms.TABLE_NAME];
                    DataRow   room   = dtRoom.Rows[0];

                    //Saving culture resources for slide name:Start

                    DataTable dtCr = ds.Tables[Entities.CultureResources.TABLE_NAME];
                    oDACr.PersistCultureResource(dtCr, transaction);
                    room[Entities.TrainingRooms.ROOM_NAME] = (Int64)dtCr.Rows[0][Entities.CultureResources.ID];

                    //Saving culture resources for slide name:Finish

                    objDARooms.Save(transaction, room);
                    objDARooms.CommitTransaction(transaction);
                }
                catch (Exception e)
                {
                    objDARooms.RollbackTransaction(transaction);
                    throw e;
                }
            }
        }
Exemple #2
0
        public DataSet GetRoomsById(string id)
        {
            DataSet dsReturn = new DataSet();

            objDARooms = new DATrainingRooms();
            dsReturn   = objDARooms.GetRoomById(id);
            return(dsReturn);
        }