Exemplo n.º 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);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Updates the Database with the current reported file size on disk
 /// </summary>
 /// <returns>File size in bytes</returns>
 public long RefreshFileSizeOnDisk()
 {
     Functions F = new Functions();
     long FileSize = F.GetActualFileSizeOnDisk(this.StoredName);
     string sSQL = "Update tblAttachments SET FileSize = " + FileSize.ToString() +
         "WHERE Id = " + mvarID;
     F.ExecuteNonQuery(sSQL);
     return FileSize;
 }
Exemplo n.º 3
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);
        }
Exemplo n.º 4
0
        public bool Update(OCL.User AccessingUser,string Description,string Format,bool UseStreamAddress,bool UseStreamPort, bool UseStreamHeader,
			bool UseConstant1, bool UseConstant2, bool UseConstant3, bool UseConstant4, 
			string Constant1, string Constant2, string Constant3, string Constant4)
        {
            if(!AccessingUser.mvarIsSuperUser)
            {
                return false;
            }

            string sSQL = "UPDATE tblSourceType SET Description = '"+ Description + "'" +
                ", Format = '" + Format + "'" +
                ", UseStreamAddress = " + Convert.ToInt32(UseStreamAddress) +
                ", UseStreamPort = " + Convert.ToInt32(UseStreamPort) +
                ", UseStreamHeader = " + Convert.ToInt32(UseStreamHeader) +
                ", UseConstant1 = " + Convert.ToInt32(UseConstant1) +
                ", UseConstant2 = " + Convert.ToInt32(UseConstant2) +
                ", UseConstant3 = " + Convert.ToInt32(UseConstant3) +
                ", UseConstant4 = " + Convert.ToInt32(UseConstant4) +
                ", Constant1 = '" + Constant1 + "'" +
                ", Constant2 = '" + Constant2 + "'" +
                ", Constant3 = '" + Constant3 + "'" +
                ", Constant4 = '" + Constant4 + "'" +
                " WHERE ID = " + this.mvarID;

            OCL.Functions F = new Functions();
            int NumRecs = F.ExecuteNonQuery(sSQL);
            if(NumRecs > 0)
                return true;
            else
                return false;
        }