예제 #1
0
 internal void SaveUserLog(UserLogg ul)
 {
     dataProvider.SaveLog(ul);
     mainWindow.DagensBruker(ul);
 }
예제 #2
0
 public void SaveUsage(DomainObjectsSalg.Sales.UserLogg ul)
 {
     db.UserLoggs.Add(ul);
     db.SaveChanges();
 }
예제 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            int i = dataGridView1.RowCount;

            for (int j = 0; j < i; j++)
            {
                DataGridViewCheckBoxCell checkCell = (DataGridViewCheckBoxCell)dataGridView1.Rows[j].Cells[0];
                dataGridView1.CommitEdit(DataGridViewDataErrorContexts.Commit);
                int t = Convert.ToInt32(dataGridView1.Rows[j].Cells[3].Value);

                Boolean b = (bool)checkCell.Value;
                if (b)
                {
                    dataGridView1.Rows[j].ReadOnly = true;
                    Users u = mc.GetBruker(t);
                    UserLogg ul = new UserLogg()
                    {
                        UsersId = u.Id,
                        Brukstid = DateTime.Now
                    };
                    mc.SaveUserLog(ul);

                }

            }

            Dispose();
        }
예제 #4
0
 internal void DagensBruker(UserLogg ul)
 {
     var u = Mc.GetBruker(ul.UsersId);
     richTextBox1.AppendText(u.Navn + "\n");
 }
예제 #5
0
 public void SaveLog(UserLogg ul)
 {
     db.UserLoggs.Add(ul);
     db.SaveChanges();
 }