| Ramona 的个人资料Ramona Eid日志 | 帮助 |
|
Ramona Eid"Queen of the [workaround]" 9月7日 Entity Framework and Join Tables.I had a true join table (two foreign keys which, together, were a composite key in the join table). I followed the steps enumerated in Julie Lerman’s Blog Don't Be Iffy and got unexpected behavior. I was not only inserting new rows where they belonged, but was adding to one of the tables with the foreign key! Not good! Briefly, the Use Case went something like this: School District personnel needed to register students into different schools. However, they needed the flexibility to pause those registrations at any time, and then to pick up where they left off. The students would not become part of the “real” tables in the database until all of that students registration information was complete. As a DBA, I built a “side-by-side” infrastructure, and only when the finish button was pushed would I move the paused student over to the “real” tables. I had tables and Entity Framework entities called: In addition, I had two join tables (for each join table: two foreign keys which, together, were a composite key in the join table).: These two join tables don’t show up as entities, but Navigation Properties in each of the foreign key entities. So, in other words, PausedSchool had a NavigationProperty called SpecialCircumstance, and School had a NavigationProperty called SpecialCircumstance. Likewise, SpecialCircumstance had two NavigationProperties, one called School and one called PausedSchool. When the finish button was clicked I should have had one new row in SchoolSpecialCircumstance that had a FK to School and a FK to SpecialCircumstance. That row was successfully inserted. HOWEVER, in addition, I had a new row in SpecialCircumstance with a new ID number, which was the same ID number as the FK in SchoolSpecialCircumstance. Not acceptable! The SpecialCircumstance were a finite list of pre-defined items, and this was in effect duplicating that data. The issue arose because I was adding objects to the School object, which had a FK to the Student object. At the end of this “chaining” I called AddToStudent on the ObjectContext so that all the FKs were populated correctly: newSchool.otherObject.Add(newObject); So what is the [workaround]? The ObjectContext has to know about the FK relationships before it can do anything with them! newSchool.otherObject.Add(newObject); And Voila! Problem solved! Just goes to prove that “timing is everything in this world!” 9月6日 Error: conversion of a datetime2 data type to a datetime data type…Using VS2008 and Entity Framework, the exact error message is: There are several causes for this rather generic (and not very intuitive) error message. I had changed some fields in the SQL 2008 database from non-nullable to nullable, and then asked the tool to “update model from database”. The error message appeared in that instance because one part of the ADO.NET Entity Data Model does not automatically get updated when this happens. The ADO.NET Entity Data Model has three parts: So what is the [workaround]? The SSDL and the MSL update just fine, but I had to “hand-code” the changes in the CSDL. And Voila! Problem solved!
…Session state can only be used when enableSessionState is set to true…I am using VS2008 in a Vista Ultimate environment. Here is the complete error message: NONE of that was the problem! I even verified that SessionState was running as a service, which it was! Okay, what is the [workaround]? Navigate to: When that dialog-box finishes loading, expand: Make sure the following two check-boxes are checked: And Viola! Problem solved! That was a two-hour ordeal for our team! Hope I saved you some time! How to force update of Intellisense without opening and closing a file in Visual Studio 2008?In Visual Studio 2008, I periodically see the error in the status bar: HOWEVER, there are no errors about this in the Error list! And, the site compiles, runs, and publishes perfectly! Total annoyance! I believe this is an error caused by the inclusion of the JQuery library and some inability of the Intellisense parser to “play nice in the playground”. Okay, so what’s the [workaround]? You can force an update of Intellisense with the following keyboard-shortcut:
And Voila! Problem Solved! Annoyance gone! 8月26日 Colorado Rapids Suffering from "”Mysterious White Box Syndrome”…As you can see from the screen-shots below, the syndrome may be fatal to their Website! Figure 1 In Figure 1, notice the prominent white-box (which is supposed to be a menu drop-down list) covering the player in the white uniform. Figure 2 In Figure 2, the box is wider and over to the right, covering advertising above the calendar schedule. How in the world did the Colorado Rapids become sick with this Mysterious White Box Syndrome? Well, I’m glad you asked! No, really, I am! Can’t you hear me smiling?! The cause of this “contracted” illness is a well known issue with IE8 (Internet Explorer 8) and the dynamic menu items of the menu control. Viewing the source, it’s obvious that the programmers used Visual Studio. They could have easily seen this problem during the debug cycle with IE8 installed (unless they made the “less than professional” mistake of running IE8 in compatibility mode – don’t develop in that mode). You always need to test your code for cross-browser compatibility. The [workaround] for this problem is a simple CSS (Cascading Style Sheet) Z-Index fix:
And voila! Disease cured! I think that [workaround] is worthy of a nomination by the Nobel Committee for Medicine, don’t you?! Do you think someone should let them know? Now, if only I had a cure for what ails them on the soccer field!! That would be a miracle! Technorati Tags: Colorado Rapids,MLS,soccer,IE8,Internet Explorer,menu control,ASP.NET,Dynamic Drop-Down menus 8月13日 ReportViewer local – rdlc – handle subreports with multiple pages and parameters
And Voila! Technorati Tags: Visual Studio 2008,ReportViewer local,ReportViewer,rdlc,subreports,multi-page,parameters 8月11日 ReportViewer local - Add a line number to the .rdlc textbox//Add a line number to the .rdlc textbox: use this formula //ReportViewer Conditional Formatting of BorderStyle based on whether anything is in the report. //ReportViewer Conditional Formating and showing the Avg if there are rows in the report. textbox: page footer not being displayed in excel export of reportviewer PctOfTotal Sum of PctOfTotal =Fields!PctOfTotal.Value And Voila! 8月10日 Implement handlers for the DataGridView control's CellValidating and CellEndEdit events.The CellValidating event handler is where you determine whether the value of a cell in the SchoolName column is empty. If the cell value fails validation, set the Cancel property of the System.Windows.Forms.DataGridViewCellValidatingEventArgs class to true. This causes the DataGridView control to prevent the cursor from leaving the cell. Set the ErrorText property on the row to an explanatory string. This displays an error icon with a ToolTip that contains the error text. In the CellEndEdit event handler, set the ErrorText property on the row to the empty string. The CellEndEdit event occurs only when the cell exits edit mode, which it cannot do if it fails validation. private void dataGridView1_CellValidating(object sender, void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e) And Voila! 2月7日 Do the Colorado Rapids deserve your money….?In this economy, I THINK NOT! That is a very difficult conclusion for me to come to! After all, I was the Rapids very First Webmaster for the first two years of their existence (for very little compensation) in 1995 thru 1997. My late husband sold more Rapids tickets (without commission) than any of the original sales force. But that was 14 long years ago! They have never been a contender in the MLS and I see nothing happening to change that. There seems to be an air of arrogance from the management on down to the playing field. The players certainly have no justification for arrogance! Quite frankly you can see better soccer at the Youth games. In the days of the previous ownership and management, there was a sense of approachability. Not now! They are pressuring me to renew my Club Season Tickets (at $60 each/game). But in this economy…I THINK NOT! Technorati Tags: Colorado Rapids 1月31日 Tips and Tricks – Windows Live Writer (WLW)
Technorati Tags: Windows Live Writer,WLW 1月20日 Keeper of the history……….For Colorado State Soccer Association (CSSA), I suddenly realize I have become “the Keeper of the history”! People who have been involved with CSSA as long as I have (30 years) have either retired or passed away. Okay, some historical facts: CSSA was founded in 1939. It started with 6 Men’s teams which were mostly “ethnic” teams sponsored by Restaurants. Fred Ahmer of Vail, Colorado, convinced the late President Gerald Ford to become a Board Member of the Vail Valley Soccer Club. One of Colorado’s own, Dr. Bob Contiguglia , more affectionately known as “Dr. Bob”, became President of US Soccer. Dr. Bob has previously been the President of US Youth Soccer. He had also founded Cherry Creek Soccer Association (now known as Storm), and had been President of Colorado Youth Soccer Association (CSYSA, now known as CYS). Dr. Bob played college ball at Columbia University in New York, and then played on adult teams for Colorado State Soccer Association (CSSA). Jon DeStefano and Ed Eid both served on his election committee when he ran for US Soccer President. This logo was designed by my late husband, Edward Eid: It is an awesome logo, which captures the “spirit of the mountains”, which is Colorado! However, what people don’t know is that Ed was born in Cairo, Egypt, and came to the United States in 1958. Those four “mountains” actually represent the four pyramids of Giza. Ed had many fond memories of climbing the pyramids, and of racing horses across the desert towards the pyramids. When he came to Colorado, he fell in love with the mountains. His love of the pyramids and of the Colorado mountains was synonymous! I later changed the logo somewhat, with Ed’s approval, for publishing on the Web in 1997 to: Edward Eid was a member of the Colorado State Soccer Association BOT from 1985 until 1997 when he assumed the General Manager position (which he held until his death in 2006). While on the CSSA BOT, Ed held almost every position, including President. He was also Vice-President of Region IV for USASA. He also owned a professional soccer team that won many national championships, the Colorado Comets. In 1986 the Colorado Comets played the Canadian National Team and barely lost 2-1 to them at the Air Force Academy in Colorado Springs. The Canadian National Team was doing high altitude training in Colorado Springs in preparation for the upcoming World Cup in Mexico City. April Heinrichs, former US Women’s Head Coach, and Captain of the first Women’s World Cup Championship team, played on Ed’s Bandits Youth Team. Ed and April are both in the Colorado Soccer Hall of Fame. In 1991 Ed Eid took two separate soccer teams on two separate trips to the then Soviet Union. The first trip also included a stop in Belgrade Yugoslavia to see the Partisans play Red Star. One of the soccer players in that first trip was Chino Melendez. The very next year both the Soviet Union and Yugoslavia ceased to exist as nations. Ed was given a citation by the Soviet Union and by his native country of Egypt as being “An Ambassador of Peace for Soccer”. One of Ed’s favorite sayings was, “What is the first thing that breaks out when war stops around the world? It’s not peace, because that takes awhile. It’s a soccer game.” After Ed’s death at the World Cup in Munich, Germany, in 2006, Senator Ken Salazar of Colorado read, on the floor of the US Senate, a tribute to Ed into the Congressional Record praising him for his efforts towards peace using the vehicle of soccer. There is so much more! 1月6日 Finally decided to Blog…I am the Geek who has resisted Blogging for so long,, but now I am going to take the plunge! Hopefully the waters will remain calm and tranquil, no matter what topics I choose! Technorati Tags: C#,ASP.NET,.NET,Software,Soccer,Colorado State Soccer Association,Colorado Rapids,MLS |
||||
|
|