private void HastaTeshisAktar(object gonderen,TeshisAktarmaTipi aktarimtipi) { Teshis aktarilacakteshis=null; if (aktarimtipi == TeshisAktarmaTipi.TeshisListesindenAktar) { if (bstumtani.Current == null) { MessageBox.Show(" Teşhis seçmediniz !"); return; } long teshisId = (bstumtani.Current as Teshis).Id; aktarilacakteshis = teshisler.Find(delegate(Teshis teshis) { return teshis.Id == teshisId; } ); TeshisAktar(gonderen, aktarilacakteshis); } else if (aktarimtipi == TeshisAktarmaTipi.DoktorTeshisListesindenAktar) { bool secerekaktarim=false; long teshisId=0; for (int i = 0; i < treeListDoktorTeshis.Nodes.Count; i++) { if (!treeListDoktorTeshis.Nodes[i].HasChildren) { if (treeListDoktorTeshis.Nodes[i].Checked) { secerekaktarim = true; teshisId =((Teshis)(treeListDoktorTeshis.Nodes[i][1])).Id; //(bsdoktortani.Current as DoktorTeshis).Teshis.Id; DoktorTeshis doktorteshis = doktorteshislistesi.Find(delegate(DoktorTeshis dteshis) { return dteshis.Teshis.Id == teshisId; } ); aktarilacakteshis = doktorteshis.Teshis; treeListDoktorTeshis.Nodes[i].Checked = false; TeshisAktar(gonderen, aktarilacakteshis); } } } if (!secerekaktarim) { if (bsdoktortani.Current == null) { MessageBox.Show(" Teşhis seçmediniz !"); return; } teshisId = (bsdoktortani.Current as DoktorTeshis).Teshis.Id; DoktorTeshis doktorteshis = doktorteshislistesi.Find(delegate(DoktorTeshis dteshis) { return dteshis.Teshis.Id == teshisId; } ); aktarilacakteshis = doktorteshis.Teshis; TeshisAktar(gonderen, aktarilacakteshis); } } }
private void HastaTeshisAktar(object gonderen, TeshisAktarmaTipi aktarimtipi) { Teshis aktarilacakteshis = null; if (aktarimtipi == TeshisAktarmaTipi.TeshisListesindenAktar) { if (bstumtani.Current == null) { MessageBox.Show(" Teşhis seçmediniz !"); return; } long teshisId = (bstumtani.Current as Teshis).Id; aktarilacakteshis = teshisler.Find(delegate(Teshis teshis) { return(teshis.Id == teshisId); } ); TeshisAktar(gonderen, aktarilacakteshis); } else if (aktarimtipi == TeshisAktarmaTipi.DoktorTeshisListesindenAktar) { bool secerekaktarim = false; long teshisId = 0; for (int i = 0; i < treeListDoktorTeshis.Nodes.Count; i++) { if (!treeListDoktorTeshis.Nodes[i].HasChildren) { if (treeListDoktorTeshis.Nodes[i].Checked) { secerekaktarim = true; teshisId = ((Teshis)(treeListDoktorTeshis.Nodes[i][1])).Id; //(bsdoktortani.Current as DoktorTeshis).Teshis.Id; DoktorTeshis doktorteshis = doktorteshislistesi.Find(delegate(DoktorTeshis dteshis) { return(dteshis.Teshis.Id == teshisId); } ); aktarilacakteshis = doktorteshis.Teshis; treeListDoktorTeshis.Nodes[i].Checked = false; TeshisAktar(gonderen, aktarilacakteshis); } } } if (!secerekaktarim) { if (bsdoktortani.Current == null) { MessageBox.Show(" Teşhis seçmediniz !"); return; } teshisId = (bsdoktortani.Current as DoktorTeshis).Teshis.Id; DoktorTeshis doktorteshis = doktorteshislistesi.Find(delegate(DoktorTeshis dteshis) { return(dteshis.Teshis.Id == teshisId); } ); aktarilacakteshis = doktorteshis.Teshis; TeshisAktar(gonderen, aktarilacakteshis); } } }