示例#1
0
        //hàm dùng chung cho tất cả những nút ghi lại lịch sử sử dụng ứng dụng

        public void WriteHistory(string name, string content, string category, string kind, string note)
        {
            try
            {
                LICHSUHOATDONG WriteHistory = new LICHSUHOATDONG();
                WriteHistory.TENDANGNHAP     = name;
                WriteHistory.THOIGIANTHAYDOI = DateTime.Now;
                WriteHistory.NOIDUNGTHAYDOI  = content;
                WriteHistory.THELOAITHAYDOI  = category;
                WriteHistory.THELOAITHAYDOI  = kind;
                WriteHistory.GHICHU          = note;
                WriteHistory.TRANGTHAI       = true;
                history.InsertHistory(WriteHistory);
            }
            catch
            {
                MessageBox.Show("Can't write history this event");
            }
        }
示例#2
0
 public void InsertHistory(LICHSUHOATDONG history)
 {
     data.LICHSUHOATDONGs.InsertOnSubmit(history);
     data.SubmitChanges();
 }