Esempio n. 1
0
        /// <summary>
        /// Constructor
        /// </summary>
        public FrmMediaImgChanger(SessionInfo session, int mediaId)
            : this()
        {
            this.session = session;
            this.mediaId = mediaId;
 
        }
Esempio n. 2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="session">The current session</param>
 /// <param name="mediaTypeId">The media type that is being handled</param>
 /// <param name="mediaIdContainer">Container for storing the new media ID</param>
 public FrmMediaAdd(SessionInfo session, int mediaTypeId, GenericIntItem mediaIdContainer)
     : this()
 {
     this.session = session;
     this.mediaTypeId = mediaTypeId;
     this.mediaIdContainer = mediaIdContainer;
 }
Esempio n. 3
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="session">The current session</param>
        public FrmMediaReturn(SessionInfo session)
            : this()
        {
            this.session = session;

            this.frmCustomerSearch = new FrmSearchCustomer(this.session);
            this.frmCustomerSearch.Owner = this;

            // attach event handlers
            this.frmCustomerSearch.CustomerSelected += CustomerSearch_CustomerSelected;
        }
Esempio n. 4
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="session">The current session</param>
        public FrmMediaTasks(SessionInfo session)
            : this()
        {
            this.session = session;

            this.frmCustomerSearch = new FrmSearchCustomer(this.session);
            this.frmCustomerSearch.Owner = this;

            // attach event handlers
            this.frmCustomerSearch.CustomerSelected += CustomerSearch_CustomerSelected;
            this.session.MediaBasketContentChanged += Session_MediaBasketContentChanged;
        }
Esempio n. 5
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="session">The current session</param>
 public FrmSearchCustomer(SessionInfo session)
     : this()
 {
     this.session = session;
 }
Esempio n. 6
0
 /// <summary>
 /// Constructor with session initalization
 /// </summary>
 /// <param name="session">The current session</param>
 public FrmCustomerManager(SessionInfo session)
     : this()
 {
     this.session = session;
 } 
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="session">The current session</param>
 /// <param name="mediaTypeId">The media type that is being handled</param>
 public FrmMediaMusicManager(SessionInfo session, int mediaTypeId)
     : base(session, mediaTypeId)
 {
     InitializeComponent();
 }
Esempio n. 8
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="session">The current session</param>
 /// <param name="mediaTypeId">The media type that is being handled</param>
 public FrmMediaBookBase(SessionInfo session, int mediaTypeId)
     : base(session, mediaTypeId)
 {
     InitializeComponent();
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="session">The current session</param>
 /// <param name="formMode">
 /// The form mode: specify if the media dialogues shall be opened 
 /// for managing media or for media selection.
 /// </param>
 public FrmMediaTypeSelector(SessionInfo session, FormMode formMode)
     : this()
 {
     this.session = session;
     this.formMode = formMode;
 }
Esempio n. 10
0
 /// <summary>
 /// Constructor with session initialization
 /// </summary>
 /// <param name="session">The current session</param>
 public FrmAdminManager(SessionInfo session)
     : this()
 {
     this.session = session;
 }
Esempio n. 11
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="session">The current session</param>
 /// <param name="mediaTypeId">The media type that is being handled</param>
 public FrmMediaMiscSearch(SessionInfo session, int mediaTypeId)
     : base(session, mediaTypeId)
 {
     InitializeComponent();
 }
Esempio n. 12
0
        /// <summary>
        /// Get account data from a given session.
        /// </summary>
        /// <remarks>
        /// Make sure to cast the obect to either an
        /// Administrators or a User object according
        /// to the AccountType of the session.
        /// </remarks>
        /// <param name="session">The session containing the account information</param>
        /// <returns>User account data as object</returns>
        public object GetAccountFromSession(SessionInfo session)
        {
            if (session == null) throw new ArgumentNullException("session");

            switch (session.AccountType)
            {
                case UserType.Administrator:
                    return GetAdministratorById(session.UserId);
                case UserType.Customer:
                    return GetUserById(session.UserId);
            }

            throw new MissingDataException();
        }
Esempio n. 13
0
        /// <summary>
        /// Constructor with session initialization
        /// </summary>
        /// <param name="session">The current session</param>
        public FrmMain(SessionInfo session) : this()
        {
            if (session == null) throw new ArgumentNullException("session");

            this.session = session;
        }
Esempio n. 14
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="session">The current session</param>
 public FrmMediaReservations(SessionInfo session)
     : this()
 {
     this.session = session;
 }
Esempio n. 15
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="session">The current session</param>
 /// <param name="mediaTypeId">The ID of the media type</param>
 public FrmMediaOverviewBase(SessionInfo session, int mediaTypeId)
     : this()
 {
     this.session = session;
     this.mediaTypeId = mediaTypeId;
 }