Пример #1
0
        public void moict(string idsp, string diengiai, float sl, float dongia, string idcv, string loaithue, float thue, float chietkhau, float thanhtien, string idpnhap, string id, string tiente, float tygia, float nguyente, double vhd, double tx, double vtt, double tn, double soluongcl)
        {
            pnhapct ct = new pnhapct();

            ct.idsanpham = idsp;
            ct.diengiai  = diengiai;
            ct.soluong   = sl;
            ct.dongia    = dongia;
            ct.idcv      = idcv;
            ct.loaithue  = loaithue;
            ct.thue      = thue;
            ct.chietkhau = chietkhau;
            ct.thanhtien = thanhtien;
            ct.idpnhap   = idpnhap;
            ct.id        = id;
            ct.tiente    = tiente;
            ct.tygia     = tygia;
            ct.nguyente  = nguyente;
            ct.vhd       = vhd;
            ct.tx        = tx;
            ct.vtt       = vtt;
            ct.tn        = tn;
            ct.soluongcl = soluongcl;
            db.pnhapcts.InsertOnSubmit(ct);
            db.SubmitChanges();
        }
Пример #2
0
        public void suact(string idsp, string diengiai, float sl, float dongia, string idcv, string loaithue, float thue, float chietkhau, float thanhtien, string idpnhap, string id, string tiente, float tygia, float nguyente, double vhd, double tx, double vtt, double tn, double soluongcl)
        {
            pnhapct ct = (from c in db.pnhapcts select c).Single(x => x.id == id);

            ct.idsanpham = idsp;
            ct.diengiai  = diengiai;
            ct.soluong   = sl;
            ct.dongia    = dongia;
            ct.idcv      = idcv;
            ct.loaithue  = loaithue;
            ct.thue      = thue;
            ct.chietkhau = chietkhau;
            ct.thanhtien = thanhtien;
            ct.tiente    = tiente;
            ct.tygia     = tygia;
            ct.nguyente  = nguyente;
            ct.vhd       = vhd;
            ct.tx        = tx;
            ct.vtt       = vtt;
            ct.tn        = tn;
            ct.soluongcl = soluongcl;
            //ct.idpnhap = idpnhap;
            //ct.id = id;

            db.SubmitChanges();
        }
Пример #3
0
        public void xoact(string id)
        {
            pnhapct ct = (from c in db.pnhapcts select c).Single(x => x.id == id);

            db.pnhapcts.DeleteOnSubmit(ct);
            db.SubmitChanges();
        }