Esempio n. 1
0
        public void Block_NhanVien(int id, int hoatdong)
        {
            NV_TuVan nv = spa.NV_TuVans.Where(t => t.ID == id).FirstOrDefault();

            if (nv != null)
            {
                nv.HoatDong_TV = hoatdong;
                spa.SubmitChanges();
            }
        }
Esempio n. 2
0
        public void deleteNhanVien(int id)
        {
            NV_TuVan nv = spa.NV_TuVans.Where(t => t.ID == id).FirstOrDefault();

            if (nv != null)
            {
                spa.NV_TuVans.DeleteOnSubmit(nv);
                spa.SubmitChanges();
            }
        }
Esempio n. 3
0
        public void addnew_NhanVien(string name, DateTime namsinh, string sdt, string gioitinh, string diachi, string cmnd, int loainv, int hoatdong)
        {
            NV_TuVan nv = new NV_TuVan();

            nv.NAME        = name;
            nv.NamSinh     = namsinh;
            nv.GioiTinh    = gioitinh;
            nv.DIACHI      = diachi;
            nv.CMND        = cmnd;
            nv.SDT         = sdt;
            nv.ID_LOAINV   = loainv;
            nv.HoatDong_TV = hoatdong;
            spa.NV_TuVans.InsertOnSubmit(nv);
            spa.SubmitChanges();
        }
Esempio n. 4
0
        public void SuaNhanVien(int id, string name, DateTime namsinh, string sdt, string gioitinh, string diachi, string cmnd, int loainv, int hoatdong)
        {
            NV_TuVan nv = spa.NV_TuVans.Where(t => t.ID == id).FirstOrDefault();

            if (nv != null)
            {
                nv.NAME        = name;
                nv.NamSinh     = namsinh;
                nv.GioiTinh    = gioitinh;
                nv.DIACHI      = diachi;
                nv.CMND        = cmnd;
                nv.SDT         = sdt;
                nv.ID_LOAINV   = loainv;
                nv.HoatDong_TV = hoatdong;
                spa.SubmitChanges();
            }
        }