Esempio n. 1
0
    public bool LogActivity(string activity, string message, string ex)
    {
        if (LoggedInUser != null)
        {
            tblActivityLog model = new tblActivityLog();

            model.Activity     = activity;
            model.ActivityDate = DateTime.Now;
            model.Exception    = ex;
            model.IP           = GetUserIP();
            model.Message      = message;
            model.SessionID    = Session.SessionID;
            model.UserID       = LoggedInUser.ID;
            model.UserName     = LoggedInUser.Name;
            model.URL          = Request.Url.AbsoluteUri;

            ActivityLogBL bl = new ActivityLogBL();
            model = bl.AddActivityLog(model);
            return(true);
        }
        else
        {
            return(false);
        }
    }
 public tblActivityLog AddActivityLog(tblActivityLog model)
 {
     using (LoanPriceEntities context = new LoanPriceEntities())
     {
         context.tblActivityLogs.AddObject(model);
         context.SaveChanges();
         return(model);
     }
 }
Esempio n. 3
0
        public void insertLog(string Name, string EmployeeNo, string Activity)
        {
            var            log = ServiceContainer.GetService <PesWeb.Service.Modules.Log>();
            tblActivityLog lg  = new tblActivityLog();

            lg.Activity   = Activity;
            lg.EmployeeNo = EmployeeNo;
            lg.Name       = Name;
            log.InsertLog(lg);
        }
Esempio n. 4
0
        public bool LogActivity(string activity, string message, string ex)
        {
            tblActivityLog model = new tblActivityLog();

            model.Activity     = activity;
            model.ActivityDate = DateTime.Now;
            model.Exception    = ex;

            model.Message = message;


            ActivityLogBL bl = new ActivityLogBL();

            model = bl.AddActivityLog(model);
            return(true);
        }
Esempio n. 5
0
        public void InsertLog(tblActivityLog log)
        {
            PSESEntities db = new PSESEntities();

            db.SP_InsertLog(log.Activity, log.EmployeeNo, log.Name);
        }