public List <chucvu> GetAllChucvu() { CSDL db = new CSDL(); var l1 = db.chucvus.Select(p => p); return(l1.ToList()); }
public dichvu LayThongTin1DichVu(int madv) { CSDL db = new CSDL(); dichvu query = db.dichvus.Where(p => p.madichvu == madv).SingleOrDefault(); return(query); }
public void Themhogiadinh(hogiadinh a) { CSDL db = new CSDL(); db.hogiadinhs.Add(a); db.SaveChanges(); }
public List <khu> GetAllKhu() { CSDL db = new CSDL(); var l1 = db.khus.Select(p => p); return(l1.ToList()); }
public List <hogiadinh> GetAllHogiadinh() { CSDL db = new CSDL(); var l1 = db.hogiadinhs.Select(p => p); return(l1.ToList()); }
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); }
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()); }
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()); }
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); }
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); }
public canho GetCanhoByMacanho(int macanho) { CSDL db = new CSDL(); canho l1 = db.canhoes.Where(p => p.macanho == macanho).FirstOrDefault(); return(l1); }
public int GetMaxMacanho() { CSDL db = new CSDL(); var l1 = db.canhoes.Max(p => p.macanho); return(Convert.ToInt32(l1)); }
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()); }
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()); }
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); }
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); }
public List <hopdong> GetListHopdongDaVao() { CSDL db = new CSDL(); var l1 = db.hopdongs.Where(p => p.dahuy == false && p.davao == true); return(l1.ToList()); }
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(); }
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 }); }
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(); }
private void btnCoSoDuLieu_Click(object sender, EventArgs e) { CSDL csdl = new CSDL();// { TopLevel = false }; // pnBoard.Controls.Clear(); //pnBoard.Controls.Add(csdl); csdl.ShowDialog(); }
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; }
public EntityTypeMapping(CSDL.Type.EntityType entityType) : base(entityType) { }