Nuts!
-
I believe you but you know... something has to change for the code to behave differently! Check out the SVN history for any changes between yesterday and today? Maybe something in the database, do you have anyway to know what changed?
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
SVN Logs, my memory, and my sister's memory. Can't think of anything else.
If the post was helpful, please vote, eh! Current activities: Book: Devils by Fyodor Dostoyevsky Project: Hospital Automation, final stage Learning: Image analysis, LINQ Now and forever, defiant to the end. What is Multiple Sclerosis[^]?
-
OK, this is driving me nuts. It was working perfectly fine yesterday and NOTHING has changed since then but it has stopped working. What is going on?
List<RCH.EL.EMR.Allergies> AllAllergies
{ get; set; }List<RCH.EL.EMR.Allergies> RemainingAllergies
{ get; set; }List<RCH.EL.EMR.Allergies> PatientAllergies
{ get; set; }protected override void LoadForm()
{
//lots of code
//retrieve the data
AllAllergies = AllergiesBL.GetAllFromDB();
PatientAllergies = PatientAllergiesBL.GetFromDB(CurrentPatient.PatientID);
RemainingAllergies = new List<EL.EMR.Allergies>();ResolveAllergies();
//Bind
Bind();}
private void ResolveAllergies()
{
RemainingAllergies = AllAllergies.Except(PatientAllergies).ToList();
}Yesterday, method Resolveallergies() worked properly, not now. Why? What am I doing wrong? I've wasted so much time on what should be a pathetically simple issue.
If the post was helpful, please vote, eh! Current activities: Book: Devils by Fyodor Dostoyevsky Project: Hospital Automation, final stage Learning: Image analysis, LINQ Now and forever, defiant to the end. What is Multiple Sclerosis[^]?
Basically this is doing object comparison. What you might want to do is roll your own comparer, like this:
public class AllergyComparer : IEqualityComparer<RCH.EL.EMR.Allergies>
{
public bool Equals(RCH.EL.EMR.Allergies a, RCH.EL.EMR.Allergies b)
{
return a.ID = b.ID;
}public int GetHashCode(RCH.EL.EMR.Allergies allergies)
{
return allergies.ID.GetHashCode();
}
}Then, your call to
ResolveAllergies
uses the following code:RemainingAllergies = AllAllergies.Except(PatientAllergies, new AllergyComparer()).ToList();
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
Basically this is doing object comparison. What you might want to do is roll your own comparer, like this:
public class AllergyComparer : IEqualityComparer<RCH.EL.EMR.Allergies>
{
public bool Equals(RCH.EL.EMR.Allergies a, RCH.EL.EMR.Allergies b)
{
return a.ID = b.ID;
}public int GetHashCode(RCH.EL.EMR.Allergies allergies)
{
return allergies.ID.GetHashCode();
}
}Then, your call to
ResolveAllergies
uses the following code:RemainingAllergies = AllAllergies.Except(PatientAllergies, new AllergyComparer()).ToList();
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
Pete, for the last 20 minutes nearly, I've been trying to reply to this message to tell you just how much I love you. You have completely saved my sanity. And though, the list of pints of bitter owed increase (+1), I am certain one day I will be over to settle said bill. Thank you for the answer! So that means the problem was with the system determining the equality, but why the heck did this change overnight! I still maintain that I have not touched that code or code directly related to it (DB,BL,EL,DAL or otherwise!)
If the post was helpful, please vote, eh! Current activities: Book: Devils by Fyodor Dostoyevsky Project: Hospital Automation, final stage Learning: Image analysis, LINQ Now and forever, defiant to the end. What is Multiple Sclerosis[^]?
-
Pete, for the last 20 minutes nearly, I've been trying to reply to this message to tell you just how much I love you. You have completely saved my sanity. And though, the list of pints of bitter owed increase (+1), I am certain one day I will be over to settle said bill. Thank you for the answer! So that means the problem was with the system determining the equality, but why the heck did this change overnight! I still maintain that I have not touched that code or code directly related to it (DB,BL,EL,DAL or otherwise!)
If the post was helpful, please vote, eh! Current activities: Book: Devils by Fyodor Dostoyevsky Project: Hospital Automation, final stage Learning: Image analysis, LINQ Now and forever, defiant to the end. What is Multiple Sclerosis[^]?
Always happy to help bud.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
I would like to know about Gluten intolerance and Caseine intolerance. I don't know if it's an allergy because it's not killing me. But it does spoil my life (slowly but surely). Except since I discovered about it recently I made some progress! :-D And also it seems to affect the brain (I read), not as an allergen but as something else...
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
-
Gluten intolerance is more of an auto-immune issue versus true allergies. It can cause Celiac's disease which can be quite dibilitating.
Back in the blog beatch! http://CraptasticNation.blogspot.com/[^]
Hey, thanks for your answer! The sad thing is, they use gluten containing stuff (flour I suppose) in so many thing today! Apart from the obvious (bread, cakes, pasta), I found that the plum sauce and soy sauce from my local supermarket contains gluten! And sausages as well! Ha well, working on it! :)
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station.... _________________________________________________________ My programs never have bugs, they just develop random features.
-
Super Lloyd wrote:
I would like to know about Gluten intolerance
Talk to me buddy - my wife is gluten intolerant. We've learned more about it than we ever wanted to know (especially how hard it is to find decent gluten free bread).
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
Pete, My wife and I started making our own bread last year when we thought I might be Coeliac. It can be a little more time consuming, but if you can find a good brand of gluten free flour, it's not half bad, and definately beats the bought loaves.
Daniel Vaughan Blog: DanielVaughan.Orpius.com
Company: Outcoder -
Pete, My wife and I started making our own bread last year when we thought I might be Coeliac. It can be a little more time consuming, but if you can find a good brand of gluten free flour, it's not half bad, and definately beats the bought loaves.
Daniel Vaughan Blog: DanielVaughan.Orpius.com
Company: OutcoderWe do that as well, and substitute Quinoah for things like Cous Cous. Mind you, there's a brand of Coeliac friendly bread here in the UK called Genius which tastes as good as the gluten version.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
We do that as well, and substitute Quinoah for things like Cous Cous. Mind you, there's a brand of Coeliac friendly bread here in the UK called Genius which tastes as good as the gluten version.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
Nice. Gotta love the smell of baking bread, pretty great.
Daniel Vaughan Blog: DanielVaughan.Orpius.com
Company: Outcoder