Example #1
0
 public string this[string columnName]
 {
     get
     {
         if (columnName == "ActionDate")
         {
             if (string.IsNullOrEmpty(ActionDate.ToString()))
             {
                 return("Action date is required");
             }
         }
         if (columnName == "ActionReason")
         {
             if (string.IsNullOrEmpty(ActionReason))
             {
                 return("Action reason is required");
             }
         }
         if (columnName == "ActionBy")
         {
             if (string.IsNullOrEmpty(ActionBy))
             {
                 return("Action by is required");
             }
         }
         //if (columnName == "PreviousTitle")
         //{
         //    if (string.IsNullOrEmpty(PreviousTitle.ToString()))
         //        return "Previous title is required";
         //}
         //if (columnName == "PreviousNode")
         //{
         //    if (string.IsNullOrEmpty(PreviousNode.ToString()))
         //        return "Previous node is required";
         //}
         if (columnName == "NewTitle")
         {
             if (string.IsNullOrEmpty(NewTitle.ToString()))
             {
                 return("New title is required");
             }
         }
         if (columnName == "NewNode")
         {
             if (string.IsNullOrEmpty(NewNode.ToString()))
             {
                 return("New node is required");
             }
         }
         if (columnName == "Type")
         {
             if (string.IsNullOrEmpty(Type.ToString()))
             {
                 return("The Type either promotion or demotion is required");
             }
         }
         return(string.Empty);
     }
 }
 public override string ToString()
 {
     return("[TransactionLog: " +
            " ID = " + ID.ToString() +
            " UserID = " + UserID +
            " TableName = " + TableName +
            " ColumnName = " + ColumnName +
            " OldValue = " + OldValue +
            " NewValue = " + NewValue +
            " Action = " + Action +
            " ActionDate = " + ActionDate.ToString() +
            " Remarks = " + Remarks + "]");
 }
        public static bool SaveAudit()
        {
            string strSQL = "INSERT INTO tblAudit (UserName,ActionDate,ActionType,ActionDescription) " +
                            " VALUES ('" + UserName + "','" + ActionDate.ToString("yyyy/MM/dd HH:mm:ss") + "','" + ActionType + "','" + ActionDescription + "')";

            if (DataAccess.ExecuteQueryStatement(strSQL) > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
 public string GetRawKey() => ActionDate.StorageString();
Example #5
0
 public string GetRawKey()
 {
     return ActionDate.StorageString();
 }
Example #6
0
 public override string ToString()
 {
     return($"TraceabilityTable is Action Number: {ActionNumber}, Action Date {ActionDate.ToString()},  " +
            $"Action Kind {ActionKind}, Pass Or Fail {PassOrFail}");
 }