internal void SaveUserLog(UserLogg ul) { dataProvider.SaveLog(ul); mainWindow.DagensBruker(ul); }
public void SaveUsage(DomainObjectsSalg.Sales.UserLogg ul) { db.UserLoggs.Add(ul); db.SaveChanges(); }
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(); }
internal void DagensBruker(UserLogg ul) { var u = Mc.GetBruker(ul.UsersId); richTextBox1.AppendText(u.Navn + "\n"); }
public void SaveLog(UserLogg ul) { db.UserLoggs.Add(ul); db.SaveChanges(); }