private void AddLeptons() { // ADD ELECTRON Electron e = new Electron(); particles.Add(e); // ADD MUON Muon muon = new Muon(); particles.Add(muon); // ADD TAUON Tauon tau = new Tauon(); particles.Add(tau); // ADD ELECTRON NEUTRINO ElectronNeutrino nu_e = new ElectronNeutrino(); particles.Add(nu_e); // ADD MUON NEUTRINO MuonNeutrino nu_muon = new MuonNeutrino(); particles.Add(nu_muon); // ADD TAUON NEUTRINO TauonNeutrino nu_tau = new TauonNeutrino(); particles.Add(nu_tau); }
public ActionResult DeleteConfirmed(string id) { Muon muon = db.Muons.Find(id); db.Muons.Remove(muon); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Mamuon,Madocgia,Masach,MaNV,Ngaymuon,Hanphaitra,Ghichu")] Muon muon) { if (ModelState.IsValid) { db.Entry(muon).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(muon)); }
public ActionResult Create([Bind(Include = "Mamuon,Madocgia,Masach,MaNV,Ngaymuon,Hanphaitra,Ghichu")] Muon muon) { if (ModelState.IsValid) { db.Muons.Add(muon); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(muon)); }
public List <Muon> LoadDSMuonMaMuon(string ma) { List <Muon> ListMuon = new List <Muon>(); DataTable data = DataProvider.Instance.ExecuteQuery("select m.MaMuon, i.MaID, d.MaDGia, d.TenDGia, s.MaSach, s.TenSach, m.SoLuong, m.NgayMuon, m.TThaiMuon from Muon as m, Sach as s, DGia as d, id as i where m.MaDGia = d.MaDGia and m.MaSach = s.MaSach and m.MaID = i.MaID and m.MaMuon = '" + ma + "'"); foreach (DataRow item in data.Rows) { Muon dsm = new Muon(item); ListMuon.Add(dsm); } return(ListMuon); }
public List <Muon> SearchMuonTenDGia(string Ten) { List <Muon> ListMuon = new List <Muon>(); DataTable data = DataProvider.Instance.ExecuteQuery("select m.MaMuon, i.MaID, d.MaDGia, d.TenDGia, s.MaSach, s.TenSach, m.SoLuong, m.NgayMuon, m.TThaiMuon from Muon as m, Sach as s, DGia as d, id as i where m.MaDGia = d.MaDGia and m.MaSach = s.MaSach and m.MaID = i.MaID and[dbo].[fuConvertToUnsign1](d.TenDGia) like N'%' +[dbo].[fuConvertToUnsign1](N'" + Ten + "') + '%'"); foreach (DataRow item in data.Rows) { Muon dsm = new Muon(item); ListMuon.Add(dsm); } return(ListMuon); }
// GET: Muons/Delete/5 public ActionResult Delete(string id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } Muon muon = db.Muons.Find(id); if (muon == null) { return(HttpNotFound()); } return(View(muon)); }