Esempio n. 1
0
        public List <chucvu> GetAllChucvu()
        {
            CSDL db = new CSDL();
            var  l1 = db.chucvus.Select(p => p);

            return(l1.ToList());
        }
Esempio n. 2
0
        public dichvu LayThongTin1DichVu(int madv)
        {
            CSDL   db    = new CSDL();
            dichvu query = db.dichvus.Where(p => p.madichvu == madv).SingleOrDefault();

            return(query);
        }
Esempio n. 3
0
        public void Themhogiadinh(hogiadinh a)
        {
            CSDL db = new CSDL();

            db.hogiadinhs.Add(a);
            db.SaveChanges();
        }
Esempio n. 4
0
        public List <khu> GetAllKhu()
        {
            CSDL db = new CSDL();
            var  l1 = db.khus.Select(p => p);

            return(l1.ToList());
        }
Esempio n. 5
0
        public List <hogiadinh> GetAllHogiadinh()
        {
            CSDL db = new CSDL();
            var  l1 = db.hogiadinhs.Select(p => p);

            return(l1.ToList());
        }
Esempio n. 6
0
        public List <chitietcanho> GetListVatdungByMacanho(int macanho)
        {
            CSDL db = new CSDL();
            var  l1 = db.chitietcanhoes.Where(p => p.macanho == macanho);

            return(l1.ToList());
        }
        public nhanvien LayThongTin1NhanVien(int maNV)
        {
            CSDL db    = new CSDL();
            var  query = db.nhanviens.Where(p => p.manhanvien == maNV).SingleOrDefault();

            return(query);
        }
Esempio n. 8
0
        public Array GetHDByNameViews(string name)
        {
            CSDL db = new CSDL();
            var  l1 = db.hopdongs.Where(p => p.tenhopdong.Contains(name)).Select(p => new { p.mahopdong, p.manhanvien, p.macanho, p.maho, p.tenhopdong, p.giatien, p.thoihan, p.ngayki, p.dahuy });

            return(l1.ToArray());
        }
Esempio n. 9
0
        public Array GetHDbyIDViews(int id)
        {
            CSDL db = new CSDL();
            var  l1 = db.hopdongs.Where(p => p.mahopdong.Equals(id) == true).Select(p => new { p.mahopdong, p.manhanvien, p.macanho, p.maho, p.tenhopdong, p.giatien, p.thoihan, p.ngayki, p.dahuy });

            return(l1.ToArray());
        }
Esempio n. 10
0
        public hogiadinh GetHoGiaDinhByid(int ID)
        {
            CSDL      db = new CSDL();
            hogiadinh l1 = db.hogiadinhs.Where(p => p.maho.Equals(ID)).Select(p => p).FirstOrDefault();

            return(l1);
        }
Esempio n. 11
0
        public List <canho> GetListCanhoByKhu(int makhu)
        {
            CSDL db = new CSDL();
            var  l2 = db.canhoes.Where(p => p.makhu == makhu);

            return(l2.ToList());
        }
        public int TongSoHoaDon()
        {
            CSDL db    = new CSDL();
            var  query = (from p in db.hoadondichvus select p.mahoadon).Count();

            return(query);
        }
        public hoadondichvu LayThongTin1HoaDon(int maHD)
        {
            CSDL db    = new CSDL();
            var  query = db.hoadondichvus.Where(p => p.mahoadon == maHD).SingleOrDefault();

            return(query);
        }
Esempio n. 14
0
        public canho GetCanhoByMacanho(int macanho)
        {
            CSDL  db = new CSDL();
            canho l1 = db.canhoes.Where(p => p.macanho == macanho).FirstOrDefault();

            return(l1);
        }
Esempio n. 15
0
        public int GetMaxMacanho()
        {
            CSDL db = new CSDL();
            var  l1 = db.canhoes.Max(p => p.macanho);

            return(Convert.ToInt32(l1));
        }
Esempio n. 16
0
        public List <canho> GetAllCanho()
        {
            CSDL db = new CSDL();
            var  l1 = db.canhoes.Select(p => p);

            return(l1.ToList());
        }
        public List <nhanvien> GetALLNhanVien()
        {
            CSDL db = new CSDL();
            var  l1 = db.nhanviens.Select(p => p);

            return(l1.ToList());
        }
Esempio n. 18
0
        public Array GetALLHDViews()
        {
            CSDL db = new CSDL();
            var  l1 = db.hopdongs.Select(p => new { p.mahopdong, p.manhanvien, p.macanho, p.maho, p.tenhopdong, p.giatien, p.thoihan, p.ngayki, p.dahuy });

            return(l1.ToArray());
        }
Esempio n. 19
0
    protected void Page_Load(object sender, EventArgs e)
    {
        CSDL kn = new CSDL();

        if (!IsPostBack)
        {
            SqlConnection conn = new SqlConnection(kn.chuoiketnoi);
            conn.Open();
            string         cho   = "select * from SanPham";
            SqlDataAdapter adap  = new SqlDataAdapter(cho, conn);
            DataTable      tbble = new DataTable();
            adap.Fill(tbble);
            CollectionPager1.PageSize      = 9;
            CollectionPager1.DataSource    = tbble.DefaultView;
            CollectionPager1.BindToControl = DLtcsp;
            DLtcsp.DataSource = CollectionPager1.DataSourcePaged;
            conn.Close();
            conn.Dispose();
            if (dlspkm.Items.Count == 0)
            {
                dlspkm.Visible    = false;
                lbltieude.Visible = false;
                imgicon.Visible   = false;
            }
        }
    }
        public canho LayThongTin1CanHo(int maCH)
        {
            CSDL db    = new CSDL();
            var  query = db.canhoes.Where(p => p.macanho == maCH).SingleOrDefault();

            return(query);
        }
Esempio n. 21
0
        public hopdong GetHopdongDavao(int macanho)
        {
            CSDL    db = new CSDL();
            hopdong l1 = db.hopdongs.Where(p => p.macanho == macanho && p.dahuy == false && p.davao == true).FirstOrDefault();

            return(l1);
        }
Esempio n. 22
0
        public List <hopdong> GetListHopdongDaVao()
        {
            CSDL db = new CSDL();
            var  l1 = db.hopdongs.Where(p => p.dahuy == false && p.davao == true);

            return(l1.ToList());
        }
Esempio n. 23
0
        public List <hopdong> GetListHopdongByMacanho(int macanho)
        {
            CSDL db = new CSDL();
            var  l1 = db.hopdongs.Where(p => p.macanho == macanho);

            return(l1.ToList());
        }
        public void Delete_NV(int manv)
        {
            CSDL db = new CSDL();
            var  nv = db.nhanviens.Where(p => p.manhanvien == manv).SingleOrDefault();

            db.nhanviens.Remove(nv);
            db.SaveChanges();
        }
Esempio n. 25
0
        public UIAssociation AddAssociation(string associationName, string navigationProperty1Name, UIEntityType navigationProperty1EntityType, Cardinality navigationProperty1Cardinality, string navigationProperty2Name, UIEntityType navigationProperty2EntityType, Cardinality navigationProperty2Cardinality)
        {
            var association = CSDL.AddAssociation(associationName, navigationProperty1Name, navigationProperty1EntityType.BusinessInstance, navigationProperty1Cardinality, navigationProperty2Name, navigationProperty2EntityType.BusinessInstance, navigationProperty2Cardinality);

            return(new UIAssociation {
                NavigationProperty1 = navigationProperty1EntityType.Properties[association.PropertyEnd1] as UIRelatedProperty, NavigationProperty2 = navigationProperty2EntityType.Properties[association.PropertyEnd2] as UIRelatedProperty
            });
        }
Esempio n. 26
0
        public void Delete(int MAHD)
        {
            CSDL db = new CSDL();
            var  l1 = db.hopdongs.Where(p => p.mahopdong.Equals(MAHD)).Select(p => p).FirstOrDefault();

            db.hopdongs.Remove((hopdong)l1);
            db.SaveChanges();
        }
Esempio n. 27
0
        private void btnCoSoDuLieu_Click(object sender, EventArgs e)
        {
            CSDL csdl = new CSDL();// { TopLevel = false };

            // pnBoard.Controls.Clear();
            //pnBoard.Controls.Add(csdl);
            csdl.ShowDialog();
        }
Esempio n. 28
0
        public void Delete_TK(int manv)
        {
            CSDL db = new CSDL();
            var  tk = db.taikhoans.Where(p => p.manhanvien == manv).SingleOrDefault();

            db.taikhoans.Remove(tk);
            db.SaveChanges();
        }
        public void XoaDichVuKhoiHD(int mahd, int madv)
        {
            CSDL db    = new CSDL();
            var  query = db.chitiethoadons.Where(p => p.mahoadon.Equals(mahd) && p.madichvu.Equals(madv)).SingleOrDefault();

            db.chitiethoadons.Remove(query);
            db.SaveChanges();
        }
        public string LayMaNhanVienTuMaHoaDon(int mahd)
        {
            CSDL db    = new CSDL();
            var  query = (from p in db.hoadondichvus
                          where p.mahoadon == mahd
                          select p.manhanvien).SingleOrDefault().ToString();

            return(query);
        }
 public AssociationMapping(CSDL.Association.Association association)
 {
     _association = association;
 }
 public ComplexPropertyMapping(CSDL.Type.EntityType entityType, ComplexProperty complexProperty)
     : base(entityType)
 {
     ComplexProperty = complexProperty;
 }
Esempio n. 33
0
  public EntityTypeMapping(CSDL.Type.EntityType entityType)
     : base(entityType)
 {
 }