Exemplo n.º 1
0
 public void AddLog(string user, string path, int type)
 {
     Logs model = new Logs()
     {
         User_Name = user,
         Object_Name = path,
         Action_Desc = (int)ActionType.Delete,
         Action_Date = DateTime.Now
     };
     LogModel.Instantce.Create(model);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Create a new Logs object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="user_Name">Initial value of the User_Name property.</param>
 /// <param name="object_Name">Initial value of the Object_Name property.</param>
 /// <param name="action_Desc">Initial value of the Action_Desc property.</param>
 /// <param name="action_Date">Initial value of the Action_Date property.</param>
 public static Logs CreateLogs(global::System.Int32 id, global::System.String user_Name, global::System.String object_Name, global::System.Int32 action_Desc, global::System.DateTime action_Date)
 {
     Logs logs = new Logs();
     logs.Id = id;
     logs.User_Name = user_Name;
     logs.Object_Name = object_Name;
     logs.Action_Desc = action_Desc;
     logs.Action_Date = action_Date;
     return logs;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Logs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToLogs(Logs logs)
 {
     base.AddObject("Logs", logs);
 }
Exemplo n.º 4
0
 // Create
 public void Create(Logs model)
 {
     dbEntities.Logs.AddObject(model);
             dbEntities.SaveChanges();
 }
Exemplo n.º 5
0
        public void AddLog(string user, string path, int type)
        {
            string _Desc = "Grant < ";
            if (((RightType)type).HasFlag(RightType.Read))
            {
                _Desc += "Read ";
            }
            if (((RightType)type).HasFlag(RightType.Create))
            {
                _Desc += "Create ";
            }
            if (((RightType)type).HasFlag(RightType.Upload))
            {
                _Desc += "Upload ";
            }
            if (((RightType)type).HasFlag(RightType.Download))
            {
                _Desc += "Download ";
            }
            if (((RightType)type).HasFlag(RightType.Delete))
            {
                _Desc += "Delete ";
            }

            //if (type == 0)
            //{
            //    _Desc += "NO ";
            //}

            _Desc += "> Rights";

            Logs model = new Logs()
            {
                User_Name = user,
                Object_Name = path,
               // Action_Desc = _Desc,
                Action_Desc = type,
                Action_Date = DateTime.Now
            };
            LogModel.Instantce.Create(model);
        }