コード例 #1
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
        public void CreateNewProductLicense(string ProductName, int NumberOfLicenses, int InactiveTimeOut)
        {
            /// This is to insure that no company would just higher a programmer to increase the available number of licenses
            /// For Carver Lab Use Only... to retrieve this key see the const string csInternalKey which is declared globally
            if(CompanyKey != m_InternalAuthorizationKey)
            {
                return;
            }

            Functions F = new Functions();
            F.CreateProductLicense(ProductName, NumberOfLicenses,InactiveTimeOut);
        }
コード例 #2
0
ファイル: Group.cs プロジェクト: CarverLab/Oyster
 public void AddStreamingEncoder(int StreamingEncoderId)
 {
     try
     {
         Functions F = new Functions();
         F.AddStreamingEncoder(StreamingEncoderId,mvarID);
         F.Dispose();
     }
     catch(Exception Err)
     {
         throw new ApplicationException(Err.Message,Err.InnerException);
     }
 }
コード例 #3
0
ファイル: Group.cs プロジェクト: CarverLab/Oyster
 public void RemoveRecording(int RecordingId)
 {
     try
     {
         Functions F = new Functions();
         F.RemoveRecordingFromGroup(RecordingId,mvarID);
         F.Dispose();
     }
     catch(Exception Err)
     {
         throw new ApplicationException(Err.Message,Err.InnerException);
     }
 }
コード例 #4
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public void InsertSectionType(int PrevSectionTypeId,string SectionTypeDescription,string CreatesSectionTypeDescription)
 {
     OysterClassLibrary.Functions F = new Functions();
     F.InsertSectionType(PrevSectionTypeId,SectionTypeDescription,CreatesSectionTypeDescription);
     F.Dispose();
 }
コード例 #5
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
        public User Login(string LoginName, string Password)
        {
            try
            {
                if(IsLoggedOn == true)
                {
                    //mvarLoggedOnUser = new User();
                    IsLoggedOn = false;
                }

                Functions F = new Functions();
                //Check to see if Login is valid and Fill User
                try
                {
                    mvarLoggedOnUser = new User();

                    mvarLoggedOnUser = F.GetUser(LoginName,Password);

                    if(mvarLoggedOnUser == null)
                    {
                        throw new ApplicationException("Invalid Login Name or Password!");
                    }
                    //myConnection.Close();
                }
                catch(Exception Err)
                {
                    throw new Exception(Err.Message,Err.InnerException);
                }

                //Check if SystemAdmin
                SectionType ST = mvarLoggedOnUser.HighestAuthorityLevel;
                if(ST.mvarPreviousSectionTypeID == -99)
                {
                    //Check to see if SystemAdmin already logged in
                    if(OysterTimer.Enabled == false)
                    {
                        SystemAdminAlreadyLoggedIn = F.IsSystemAdminLoggedIn();
                        if(SystemAdminAlreadyLoggedIn == false)
                        {
                            AcquireSystemLock();
                            OysterTimer.Enabled = true;
                        }
                    }

                }

                IsLoggedOn = true;
                return mvarLoggedOnUser;
            }
            catch(Exception Err)
            {
                throw new Exception(Err.Message,Err.InnerException);
            }
        }
コード例 #6
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public User GetUserByCardNumberRaw(string CardNumber)
 {
     string FCardNumber = FormatCardNumber(CardNumber);
     Functions F = new Functions();
     User U = F.GetUser(FCardNumber);
     F.Dispose();
     return U;
 }
コード例 #7
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public VideoStorageServer GetVideoStorageServerById(int Id)
 {
     Functions F = new Functions();
     VideoStorageServer X = F.GetVideoStorageServer(Id);
     F.Dispose();
     return X;
 }
コード例 #8
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public ForwardingServer GetForwardingServerById(int Id)
 {
     Functions F = new Functions();
     ForwardingServer X = F.GetForwardingServer(Id);
     F.Dispose();
     return X;
 }
コード例 #9
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public MediaBufferServer GetMediaBufferServerById(int Id)
 {
     Functions F = new Functions();
     MediaBufferServer X = F.GetMediaBufferServer(Id);
     F.Dispose();
     return X;
 }
コード例 #10
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 /// <summary>
 /// Retrieves either all Current Groups or only the Public Access Groups in the System based on the supplied boolean parameter
 /// </summary>
 /// <param name="PublicOnly"></param>
 /// <returns></returns>
 public Groups GetALLGroups(bool PublicOnly)
 {
     Functions F = new Functions();
     Groups G = F.GetGroups(PublicOnly);
     F.Dispose();
     return G;
 }
コード例 #11
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public CardReader GetCardReaderById(int Id)
 {
     Functions F =new Functions();
     CardReader X = F.GetCardReader(Id);
     F.Dispose();
     return X;
 }
コード例 #12
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public void DeleteRecordingById(int RecordingId)
 {
     try
     {
         Functions F = new Functions();
         F.DeleteRecording(RecordingId);
         F.Dispose();
     }
     catch(Exception Err)
     {
         throw new Exception(Err.Message);
     }
 }
コード例 #13
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public Section CurrentSystemSection(string OysterPassword)
 {
     if(OysterPassword == "6419DC43-84B9-43e2-89FE-BB8C96D5CF6F")
     {
         Functions F = new Functions();
         Section X = F.GetSystemSection();
         return X;
     }
     else
         return null;
 }
コード例 #14
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public Recording CreateRecording(string RecordingName,string DisplayName,int OwnerID,int VideoStorageServerID,int StreamingEncoder, string SessionID, string SessionName)
 {
     Functions F = new Functions();
     Recording R = F.CreateARecording(RecordingName,DisplayName,OwnerID,VideoStorageServerID,StreamingEncoder,SessionID,SessionName);
     F.Dispose();
     return R;
 }
コード例 #15
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public string GetSystemName()
 {
     Functions F = new Functions();
     string SystemName = F.GetSystemName();
     F.Dispose();
     return SystemName;
 }
コード例 #16
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public Recording GetRecordingById(int Id)
 {
     Functions F = new Functions();
     Recording X = F.GetRecording(Id);
     F.Dispose();
     return X;
 }
コード例 #17
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public User GetUserByCardNumber(string CardNumber)
 {
     Functions F = new Functions();
     User U = F.GetUser(CardNumber);
     F.Dispose();
     return U;
 }
コード例 #18
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public Recording GetRecordingByName(string RecordingName)
 {
     Functions F =  new Functions();
     Recording R = F.GetRecordingByDescription(RecordingName);
     F.Dispose();
     return R;
 }
コード例 #19
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public User GetUserById(int Id)
 {
     Functions F = new Functions();
     User U = F.GetUser(Id);
     F.Dispose();
     return U;
 }
コード例 #20
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public Room GetRoomById(int Id)
 {
     Functions F =  new Functions();
     Room X = F.GetRoom(Id);
     F.Dispose();
     return X;
 }
コード例 #21
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public void InsertPermission(int SectionTypeId,int PermissionId, int TargetSectionTypeId)
 {
     OysterClassLibrary.Functions F = new Functions();
     F.InsertPermission(SectionTypeId,PermissionId,TargetSectionTypeId);
     F.Dispose();
 }
コード例 #22
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public Section GetSectionById(int Id)
 {
     Functions F = new Functions();
     Section S = F.GetSection(Id);
     F.Dispose();
     return S;
 }
コード例 #23
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
        public User Login(string CardNumber)
        {
            try
            {
                User TempUser = null;
                Functions F =new Functions();
                //Check to see if Login is valid and Fill User
                try
                {
                    TempUser = new User();

                    TempUser = F.GetUser(CardNumber);
                    if(TempUser == null)
                        throw new ApplicationException("Card not found in database!");

                    return Login(TempUser.LoginName,TempUser.Password);
                }
                catch(Exception Err)
                {
                    throw new ApplicationException(Err.Message);
                }
            }
            catch(Exception Err)
            {
                throw new ApplicationException(Err.Message);
            }
        }
コード例 #24
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public SectionType GetSectionTypeById(int Id)
 {
     Functions F = new Functions();
     SectionType X = F.GetSectionType(Id);
     F.Dispose();
     return X;
 }
コード例 #25
0
ファイル: Group.cs プロジェクト: CarverLab/Oyster
 public void AddRoom(int RoomId)
 {
     try
     {
         Functions F = new Functions();
         F.AddRoom(RoomId,mvarID);
         F.Dispose();
     }
     catch(Exception Err)
     {
         throw new ApplicationException(Err.Message,Err.InnerException);
     }
 }
コード例 #26
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public Recordings GetSessionById(string Id)
 {
     Functions F = new Functions();
     Recordings X = F.GetSessionById(Id);
     F.Dispose();
     return X;
 }
コード例 #27
0
ファイル: Group.cs プロジェクト: CarverLab/Oyster
 public void AddUser(int UserId)
 {
     try
     {
         Functions F = new Functions();
         F.AddUser(UserId,(double)mvarID);
         F.Dispose();
     }
     catch(Exception Err)
     {
         throw new ApplicationException(Err.Message,Err.InnerException);
     }
 }
コード例 #28
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public StreamingEncoder GetStreamingEncoderById(int Id)
 {
     Functions F = new Functions();
     StreamingEncoder X = F.GetStreamingEncoder(Id);
     F.Dispose();
     return X;
 }
コード例 #29
0
ファイル: Group.cs プロジェクト: CarverLab/Oyster
 public void RemoveUser(int UserId)
 {
     try
     {
         Functions F = new Functions();
         F.RemoveUserFromGroup(UserId,mvarID);
         F.Dispose();
     }
     catch(Exception Err)
     {
         throw new ApplicationException(Err.Message,Err.InnerException);
     }
 }
コード例 #30
0
ファイル: Oyster.cs プロジェクト: CarverLab/Oyster
 public void ClearUserLicense(Int64 UserSessionID,int UserID,string ProductVersionID)
 {
     Functions F = new Functions();
     F.ExecuteNonQuery("DELETE FROM tblLogin WHERE UserSessionID = " + UserSessionID +
                      " AND UserID = " + UserID + " AND ProductVersionID = " + ProductVersionID);
 }