コード例 #1
0
        public activitylog GetActivityLog(int ID)
        {
            activitylog objActivityLog = new activitylog();

            try
            {
                ActivityLogDataService.CreateSession();
                objActivityLog = ActivityLogDataService.GetActivityLog(ID);
            }
            catch (Exception ex)
            {
            }
            finally
            {
                ActivityLogDataService.CloseSession();
            }

            return(objActivityLog);
        }
コード例 #2
0
        public activitylog AddActivityLog(activitylog objActivityLog)
        {
            try
            {
                ActivityLogDataService.CreateSession();
                ActivityLogDataService.BeginTransaction();
                ActivityLogDataService.AddActivityLog(objActivityLog);
                ActivityLogDataService.CommitTransaction(true);
            }
            catch (Exception ex)
            {
            }
            finally
            {
                ActivityLogDataService.CloseSession();
            }

            return(objActivityLog);
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: BryanOrtega/Sample
        private void button4_Click_1(object sender, EventArgs e)
        {
            //actlog
            MySqlConnection  sqlcon = new MySqlConnection("DATA SOURCE= 127.0.0.1; INITIAL CATALOG=it_2d; UID=root");
            MySqlCommand     sqlcom = new MySqlCommand("SELECT * FROM tbl_activitylog", sqlcon);
            MySqlDataAdapter sqlDA  = new MySqlDataAdapter();
            DataSet2         ds     = new DataSet2();

            sqlcon.Open();
            sqlcom.CommandType  = CommandType.Text;
            sqlDA.SelectCommand = sqlcom;
            sqlDA.Fill(ds, "activitylog");
            // dataGridView1.DataSource = ds;
            // dataGridView1.DataMember = "tbl_penalty";


            activitylog cry = new activitylog();

            cry.SetDataSource(ds);
            crystalReportViewer1.ReportSource = cry;
            sqlcon.Close();
        }
コード例 #4
0
ファイル: WebUtils.cs プロジェクト: sohelmaruf/WaterCons
        public static void AddActivityLog(int userID, int clientID, string module, string view, string url, string activity)
        {
            activitylog                log                 = new activitylog();
            IActivityLogDataService    dataService         = new ActivityLogDataService();
            ActivityLogBusinessService aLogBusinessService = new ActivityLogBusinessService(dataService);

            try
            {
                log.UserID      = userID;
                log.ClientID    = clientID;
                log.LogTime     = DateTime.Now;
                log.Module      = module;
                log.View        = view;
                log.Url         = url;
                log.Description = activity;

                aLogBusinessService.AddActivityLog(log);
            }
            catch (Exception ex)
            {
            }
        }
コード例 #5
0
 public void UpdateActivityLog(activitylog objActivityLog)
 {
     dbConnection.activitylogs.Add(objActivityLog);
 }
コード例 #6
0
        public activitylog GetActivityLog(int ID)
        {
            activitylog objActivityLog = dbConnection.activitylogs.SingleOrDefault(u => u.ID == ID);

            return(objActivityLog);
        }