Exemple #1
0
        public void Update(bool IsDesktopCapture,bool IsPrimaryCamera)
        {
            Functions F = new Functions();

            int LatestSessionId = this.SessionID;

            if(IsPrimaryCamera == true)
            {
                string sTSQL = "Update tblRecording SET IsPrimaryCamera = 0 WHERE SessionId = " + LatestSessionId;
                int TResults = F.ExecuteNonQuery(sTSQL);
            }
            if(IsDesktopCapture == true)
            {
                string sTSQL = "Update tblRecording SET IsDesktopCapture = 0 WHERE SessionId = " + LatestSessionId;
                int TResults = F.ExecuteNonQuery(sTSQL);
            }
            string sSQL = "UPDATE tblRecording SET IsDesktopCapture = " + Convert.ToInt32(IsDesktopCapture) +
                ", IsPrimaryCamera = " + Convert.ToInt32(IsPrimaryCamera) +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Exemple #2
0
        public void Update(long RecordingSize)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblRecording SET DiskSize = " + RecordingSize +
                " WHERE ID = " + mvarID;
            int results = F.ExecuteSqlCommand(sSQL);
        }
Exemple #3
0
        /// <summary>
        /// Assigns Recording to another a different Session
        /// </summary>
        /// <param name="SessionId"></param>
        /// <param name="DummyVariable"></param>
        public void Update(int SessionId, bool DummyVariable)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblRecording SET SessionId = '" + SessionId + "'" +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Exemple #4
0
        public void Update(int VideoStorageServerId, int StreamingEncoderId)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblRecording SET VideoStorageServerID = " + VideoStorageServerID +
                ", StreamingEncoderID = " + StreamingEncoderID +
                " WHERE ID = " + mvarID;
            int results = F.ExecuteSqlCommand(sSQL);
        }
Exemple #5
0
        public bool UpdatePermissions(OCL.User CurrentUser, bool IsSuperUser)
        {
            if(this.mvarIsPublicAccess)
            {
                return false;
            }
            Functions F = new Functions();
            string sCommand = "";
            if(CurrentUser.mvarIsSuperUser == true)
            {
                sCommand = "UPDATE tblUSER SET IsSuperUser = "******" WHERE ID = " + mvarID;
            }
            else
            {
                return false;
            }

            int orow = F.ExecuteSqlCommand(sCommand);

            if(orow == 0)
                return false;
            else
                return true;
        }
Exemple #6
0
        public void Update(string DisplayName)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblRecording SET DisplayName = '" + DisplayName + "'" +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
        public void Update(string ControlAddress, int ControlPort, string UploadAddress, bool IsUploadFTP, string StorageDirectory,int VideoStorageServerTypeId)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblVideoStorageServer SET ControlAddress = '" + ControlAddress.ToUpper() + "'" +
                ", ControlPort = " + ControlPort +
                ", UploadAddress = '" + UploadAddress.ToUpper() + "'" +
                ", IsUploadFTP = " + Convert.ToInt32(IsUploadFTP) +
                ", StorageDirectory = '" + StorageDirectory + "'" +
                ", TypeId = " + VideoStorageServerTypeId +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Exemple #8
0
        internal void SetIsMarkedForDeletion(bool IsMarkedForDeletion)
        {
            Functions F = new Functions();

            int intBool = Convert.ToInt32(IsMarkedForDeletion);

            string sSQL = "UPDATE tblRecording SET IsMarkedForDeletion = " + intBool +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Exemple #9
0
        public void Update(string Description,string ControlAddress, int ControlPort, string StreamingAddress, int StreamPort, 
            bool IsMulticast, bool HasControlableCamera, int MediaBufferServerID, int SceneID, string StreamingHeader)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblSource SET Description = '" + Description + "'" +
                ",ControlAddress = '" + ControlAddress.ToUpper() + "'" +
                ", ControlPort = " + ControlPort +
                ", StreamAddress = '" + StreamingAddress.ToUpper() + "'" +
                ", StreamPort = " + StreamPort +
                ", IsMulticast = " + Convert.ToInt32(IsMulticast) +
                ", HasControlableCamera = " + Convert.ToInt32(HasControlableCamera) +
                ", MediaBufferServerID = " + MediaBufferServerID +
                ", SceneID = " + SceneID +
                ", StreamingHeader = '" + StreamingHeader + "'" +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Exemple #10
0
        public void Update(string Description,int OwnerID,int PreviousSectionID)
        {
            Functions F = new Functions();

            bool KeepUser = true;
            int[] UO = F.GetUnassignedObjects();
            //Check to see if this is NoBody User

            if(mvarOwnerID == UO[0])
            {
                OCL.Section PrevSect = F.GetSection(PreviousSectionID);
                foreach(OCL.User U in PrevSect.CurrentUsers)
                {
                    if(U.ID == mvarOwnerID)
                    {
                        if(U.NextOwnedSections.Count == 1)
                        {
                            KeepUser = false; //The Nobody User only has this one
                                              //section attached to this branch it
                                              //is ok to remove him after reassign
                        }
                    }
                }
            }
            string sSQL = "UPDATE tblSection SET Name = '" + Description +
                          "' , OwnerID = " + OwnerID +
                          " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
            int OldOwner = mvarOwnerID;
            if(OwnerID != mvarOwnerID)
            {
                try
                {
                    sSQL = "SELECT * FROM tblUserSectionRel WHERE UserId = " + OwnerID + " AND " +
                        "SectionId = " + PreviousSectionID;
                    // "SectionId = " + mvarID;

                    DataSet DS = F.ReturnDataSet(sSQL);
                    DataTable DT = DS.Tables[0];

                    if(DT.Rows.Count == 0)
                    {
                        F.AddUser(OwnerID,PreviousSectionID);
                    }
                    if(!KeepUser)
                        F.RemoveUser(OldOwner,PreviousSectionID);

                    mvarOwnerID = OwnerID;
                }
                catch(Exception Err)
                {
                    throw new ApplicationException(Err.Message,Err.InnerException);
                }
            }
        }
Exemple #11
0
        public void Update(string Address, int Port,int SceneID, bool IsOnSerialPort)
        {
            Functions F = new Functions("Jeremiah",13075);

            string sSQL = "UPDATE tblControl SET Address = '" + Address.ToUpper() + "'" +
                ", SceneID = " + SceneID +
                ", IsOnSerialPort = " + Convert.ToInt32(IsOnSerialPort) +
                ", Port = " + Port +
                " WHERE ID = " + mvarID;

            try
            {
                int results = F.ExecuteSqlCommand(sSQL);
            }
            catch(Exception Err)
            {
                string peekerror = Err.Message;
            }
        }
Exemple #12
0
        public void Update(string Name, string FileImage)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblPlayList SET FileImage = '" + FileImage + "'" +
                ", SET Name = '" + Name + "'" +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Exemple #13
0
        public void Update(string Address, int VideoStorageServerID, int Port)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblForwardingServer SET Address = '" + Address.ToUpper() + "'" +
                ", VideoStorageServerID = " + VideoStorageServerID +
                ", Port = " + Port +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Exemple #14
0
        public void Update(int LengthInSeconds)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblRecording SET PlayLength = " + LengthInSeconds +
                " WHERE ID = " + mvarID;
            int results = F.ExecuteSqlCommand(sSQL);
        }
Exemple #15
0
        public void Update(string Description,string DisplayName, int VideoStorageServerID,
			int StreamingEncoderID,string SessionId, bool IsMarkedForDeletion,bool IsReady, 
			bool IsDesktopCapture, bool IsPrimaryCamera)
        {
            Functions F = new Functions();

            int LatestSessionId = this.SessionID;

            if(IsPrimaryCamera == true)
            {
                string sTSQL = "Update tblRecording SET IsPrimaryCamera = 0 WHERE SessionId = " + LatestSessionId;
                int TResults = F.ExecuteNonQuery(sTSQL);
            }
            if(IsDesktopCapture == true)
            {
                string sTSQL2 = "Update tblRecording SET IsDesktopCapture = 0 WHERE SessionId = " + LatestSessionId;
                int TResults2 = F.ExecuteNonQuery(sTSQL2);
            }
            string sSQL = "UPDATE tblRecording SET Name = '" + Description + "'" +
                ", DisplayName = '" + DisplayName + "'" +
                ", VideoStorageServerID = " + VideoStorageServerID +
                ", StreamingEncoderID = " + StreamingEncoderID +
                ", SessionId = '" + SessionId + "'" +
                ", IsMarkedForDeletion = " + Convert.ToInt32(IsMarkedForDeletion) +
                ", IsReady = " + Convert.ToInt32(IsReady) +
                ", IsDesktopCapture = " + Convert.ToInt32(IsDesktopCapture) +
                ", IsPrimaryCamera = " + Convert.ToInt32(IsPrimaryCamera) +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Exemple #16
0
        public void Update(bool IsReady)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblRecording SET IsReady = " + Convert.ToInt32(IsReady) +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Exemple #17
0
        public void Update(string Description, string DisplayName, int VideoStorageServerID,
			int StreamingEncoderID,bool IsReady)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblRecording SET Name = '" + Description + "'" +
                ", DisplayName = '" + DisplayName + "'" +
                ", VideoStorageServerID = " + VideoStorageServerID +
                ", StreamingEncoderID = " + StreamingEncoderID +
                ", IsReady = " + Convert.ToInt32(IsReady) +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Exemple #18
0
        public void Update(string Address, int ForwardingServerID, string StorageDirectory, int Port)
        {
            Functions F = new Functions();

            string sSQL = "UPDATE tblMediaBufferServer SET Address = '" + Address.ToUpper() + "'" +
                ", ForwardingServerID = " + ForwardingServerID +
                ", StorageDirectory = '" + StorageDirectory + "'" +
                ", Port = " + Port +
                " WHERE ID = " + mvarID;

            int results = F.ExecuteSqlCommand(sSQL);
        }
Exemple #19
0
        public bool SetSystemAdministratorAccess(OCL.User AccessingUser, bool IsSystemAdministrator)
        {
            if(AccessingUser.mvarIsSuperUser)
            {
                Functions F = new Functions();
                string sCommand = "UPDATE tblUSER SET IsSuperUser = "******" WHERE ID = " + mvarID;

                int orow = F.ExecuteSqlCommand(sCommand);

                if(orow == 0)
                    return false;
                else
                    return true;
            }
            return false;
        }