public void SetMoctien(double moctien, string taikhoan) { DataManagerMoneyEntities db = new DataManagerMoneyEntities(); db.TaiKhoans.Find(taikhoan).Moctien = moctien; db.SaveChanges(); }
public void deleteChi(int Ma) { DataManagerMoneyEntities db = new DataManagerMoneyEntities(); var data = db.ChiRas.Find(Ma); db.ChiRas.Remove(data); db.SaveChanges(); db.Dispose(); }
public void Editthu(int ma, string tenthu, float gia, DateTime time) { var db = new DataManagerMoneyEntities(); var t = db.ThuVaos.Find(ma); t.TenThuVao = tenthu; t.GiaTien = gia; t.Time = time; db.SaveChanges(); }
public void EditChi(int ma, string tenchi, double gia, int soluong, DateTime time) { var db = new DataManagerMoneyEntities(); var t = db.ChiRas.Find(ma); t.TenChi = tenchi; t.GiaTien = gia * soluong; t.Time = time; t.soluong = soluong; db.SaveChanges(); }
public void DangKy(string tk, string matKhau) { TaiKhoan temp = new TaiKhoan(); temp.taiKhoan1 = tk; temp.matKhau = matKhau; DataManagerMoneyEntities db = new DataManagerMoneyEntities(); db.TaiKhoans.Add(temp); db.SaveChanges(); db.Dispose(); }
public void SetThuvao(string taikhoan, string tenthu, double gia, DateTime time) { ThuVao temp = new ThuVao(); temp.TenTK = taikhoan; temp.TenThuVao = tenthu; temp.GiaTien = gia; temp.Time = time; DataManagerMoneyEntities db = new DataManagerMoneyEntities(); db.ThuVaos.Add(temp); db.SaveChanges(); db.Dispose(); }
public void SetChiRa(string taikhoan, string tenchi, float gia, int soluong, DateTime time) { ChiRa temp = new ChiRa(); temp.TenTK = taikhoan; temp.TenChi = tenchi; temp.soluong = soluong; temp.GiaTien = gia * soluong; temp.Time = time; DataManagerMoneyEntities db = new DataManagerMoneyEntities(); db.ChiRas.Add(temp); db.SaveChanges(); db.Dispose(); }