Exemplo n.º 1
0
        public void deleteChi(int Ma)
        {
            DataManagerMoneyEntities db = new DataManagerMoneyEntities();
            var data = db.ChiRas.Find(Ma);

            db.ChiRas.Remove(data);
            db.SaveChanges();
            db.Dispose();
        }
Exemplo n.º 2
0
        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();
        }
Exemplo n.º 3
0
        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();
        }
Exemplo n.º 4
0
        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();
        }