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 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(); }