public static void LoadData(string start, string end) { _roles = new List <Roles>(Roles.ListRoles()); _patients = new List <Patient>(Patient.ListPatients()); _users = new List <Users>(Users.ListUsers()); _events = new List <Events>(Events.ListEvents()); _clinics = new List <Clinics>(Clinics.ListClinic()); _branch = new List <Branch>(Branch.ListBranch()); _queues = new List <Queue>(Queue.ListQueue()); _admit = new List <Admission>(Admission.ListAdmission()); _wards = new List <Wards>(Wards.ListWards()); _departments = new List <Departments>(Departments.ListDepartment()); _procedures = new List <Procedures>(Procedures.ListProcedures()); _operations = new List <Operations>(Operations.ListOperations()); _specimens = new List <Specimens>(Specimens.ListSpecimens()); _tests = new List <Tests>(Tests.ListTests()); _disciplines = new List <Discipline>(Discipline.ListDiscipline()); _beds = new List <Beds>(Beds.ListBeds()); _categories = new List <Category>(Category.ListCategory()); _cds = new List <Cd10>(Cd10.ListCd10()); _items = new List <Item>(Item.ListItem()); _stocks = new List <Stock>(Stock.ListStock()); _dosages = new List <Dosage>(Dosage.ListDosage()); _transactors = new List <Transactor>(Transactor.ListTransactors()); // _services = new List<Services>(Services.ListServices()); // _diagnosis = new List<Diagnosis>(Diagnosis.ListDiagnosis()); _rooms = new List <Room>(Room.ListRoom()); // _vitals = new List<Vitals>(Vitals.ListVitals()); _org = new List <Organisation>(Organisation.ListOrganisation()); }
private void saveBtn_Click(object sender, EventArgs e) { if (serviceTxt.Text == "") { serviceTxt.BackColor = Color.Red; return; } string id = Guid.NewGuid().ToString(); Specimens _specimen = new Specimens(id, codeTxt.Text, nameTxt.Text, serviceTxt.Text, DateTime.Now.ToString("dd-MM-yyyy H:mm:ss"), Helper.orgID); if (DBConnect.Insert(_specimen) != "") { Global._specimens.Add(_specimen); serviceTxt.Text = ""; nameTxt.Text = ""; codeTxt.Text = ""; MessageBox.Show("Information Saved"); this.DialogResult = DialogResult.OK; this.Dispose(); } else { return; } }
private void dtGrid_CellEndEdit(object sender, DataGridViewCellEventArgs e) { updateID = dtGrid.Rows[e.RowIndex].Cells[1].Value.ToString(); _specimen = new Specimens(updateID, dtGrid.Rows[e.RowIndex].Cells[2].Value.ToString(), dtGrid.Rows[e.RowIndex].Cells[3].Value.ToString(), dtGrid.Rows[e.RowIndex].Cells[4].Value.ToString(), DateTime.Now.ToString("dd-MM-yyyy H:mm:ss"), Helper.orgID); DBConnect.Update(_specimen, updateID); Global._specimens.RemoveAll(x => x.Id == updateID); Global._specimens.Add(_specimen); }
public List <Specimen> GetSpecimensNaviagtion() { return(Specimens .Include(col => col.CompressorSymbolNavigation) .Include(col => col.BodySymbolNavigation) .Include(col => col.SpecimenAdditionalEq) .ThenInclude(ad => ad.SymbolNavigation) .Include(col => col.SpecimenBalcony) .ThenInclude(bl => bl.SymbolNavigation) .Include(col => col.SpecimenHandle) .ThenInclude(han => han.SymbolNavigation) .Include(col => col.SpecimenShelf) .ThenInclude(sh => sh.SymbolNavigation) .Include(col => col.Fridge) .ToList()); }
public IEnumerable <Specimen> GetSpecimens() { return(Specimens.AsEnumerable()); }