public void EditTimeIn(int mals, string tendn, DateTime intime)
 {
     try
     {
         using (QLCuaHangDataContext cuahang = new QLCuaHangDataContext())
         {
             LsTaiKhoan lstk = cuahang.LsTaiKhoans.Single(ls => ls.MaLS == mals && ls.TenDangNhap == tendn);
             lstk.SignIn = intime;
             cuahang.SubmitChanges();
         }
     }
     catch (Exception ex) { myme.ShowError(ex); }
 }
        public LsTaiKhoan DetailLsTK(int mals, string tendn)
        {
            LsTaiKhoan lstk = new LsTaiKhoan();

            foreach (LsTaiKhoan ls in GetLsTaiKhoan(tendn))
            {
                if (ls.MaLS == mals)
                {
                    lstk = ls;
                }
            }
            return(lstk);
        }
 //Do mã tự tăng nên không cần thêm thông tin MaLSTaiKhoan.
 public void AddLsTaiKhoan(string tendn)
 {
     try
     {
         using (QLCuaHangDataContext cuahang = new QLCuaHangDataContext())
         {
             LsTaiKhoan lstk = new LsTaiKhoan()
             {
                 TenDangNhap = tendn, SignIn = null, SignOut = null
             };
             cuahang.LsTaiKhoans.InsertOnSubmit(lstk);
             cuahang.SubmitChanges();
         }
     }
     catch (Exception ex) { myme.ShowError(ex); }
 }