public Diagnosis FindDiagnosByName(int index, TypeResearch type) { Diagnosis diagnos = new Diagnosis(); try { switch (type) { case TypeResearch.Category1: case TypeResearch.Category2: case TypeResearch.Category3: diagnos = diagnosesAll.GetDiagnosesBio()[index]; break; case TypeResearch.LittleOperation: diagnos = diagnosesAll.GetDiagnosesLittle()[index]; break; case TypeResearch.BigOperationWithout: case TypeResearch.BigOperationWith: diagnos = diagnosesAll.GetDiagnosesBig()[index]; break; } } catch (Exception ex) { } return(diagnos); }
private void txtInputID_TextChanged(object sender, EventArgs e) { if (txtInputID.Text == "") { txtPrepare.Text = ""; txtInputPrice.Text = ""; } try { int id = Int16.Parse(txtInputID.Text); Transaction transaction = traService.FindById(id); TypeResearch type = transaction.GetTypeResearch(); string org = transaction.GetOrganization().GetName(); string cat = transaction.GetOrganization().GetCategory().GetName(); string typ = DiaAllService.GetTypeResearchString(type); string dia = transaction.GetDiagnosis().GetName(); string price = transaction.GetPrice().ToString(); string descr = transaction.GetDescription(); string dat = transaction.GetRecordDate().ToString(); txtDescription.Text = descr; txtInputPrice.Text = price.ToString(); txtPrepare.Text = id.ToString() + ", - " + dat + " <" + org + "> (" + cat + ") " + typ + " " + dia + " " + price + "грн. " + descr; } catch (Exception ex) { } }
public string GetTypeResearchString(TypeResearch type) { switch (type) { case TypeResearch.Category1: return("біопсія категорія 1"); case TypeResearch.Category2: return("біопсія категорія 2"); case TypeResearch.Category3: return("біопсія категорія 3"); case TypeResearch.LittleOperation: return("малий операційний"); case TypeResearch.BigOperationWithout: return("великий операційний без лімфовузлів"); case TypeResearch.BigOperationWith: return("вевикий операційний з лімфовузлами"); } return(null); }
public Transaction(Organization org, TypeResearch typ, Diagnosis dia, string description, DateTime recordDate) { this.Id = 10 * countId++; this.Org = org; this.Cat = Org.GetCategory(); this.Typ = typ; this.Dia = dia; ChoisePrice(); this.Description = description; this.RecordDate = recordDate; }
private void showTransaction() { cmdDiagnosisBio.SelectedIndex = -1; cmdDiagnosisLitt.SelectedIndex = -1; cmdDiagnosisBig.SelectedIndex = -1; cmdDiagnosisBio.Text = "Виберіть діагноз"; cmdDiagnosisLitt.Text = "Виберіть діагноз"; cmdDiagnosisBig.Text = "Виберіть діагноз"; txtDescription.Text = ""; lblCategoryOrg.Text = ""; txtBResult.Text = ""; string rezultText = ""; int lastIndexTransaction = traService.GetTransactions().Count() - 1; int stopIndexTransaction = lastIndexTransaction - 50; stopIndexTransaction = stopIndexTransaction < 0 ? 0 : stopIndexTransaction; for (int i = lastIndexTransaction; i >= stopIndexTransaction; i--) { try { Transaction transaction = traService.GetTransactions()[i]; TypeResearch type = transaction.GetTypeResearch(); string id = transaction.GetId().ToString(); string org = transaction.GetOrganization().GetName(); string cat = transaction.GetOrganization().GetCategory().GetName(); string typ = DiaAllService.GetTypeResearchString(type); string dia = transaction.GetDiagnosis().GetName(); string price = transaction.GetPrice().ToString(); string descr = transaction.GetDescription(); string dat = transaction.GetRecordDate().ToString(); rezultText += id + ", - " + dat + " <" + org + "> (" + cat + ") " + typ + " " + dia + " " + price + "грн. " + descr + "\r\n"; } catch (Exception ex) { } } txtBResult.Text = rezultText; }
public void SetTypeResearch(TypeResearch typ) { this.Typ = typ; ChoisePrice(); }
public Diagnosis FindDiagnosLittleByName(string name, TypeResearch type) { return(diagnosesLittle.Find(o => o.GetName().Equals(name)));; }