|
Dear developers,
Does someone knows how can I iterate all open child forms from the mdi parent
And for each form save the report to one excel file?
|
|
|
|
|
Hope thsi will help you
foreach (Form frm in Application.OpenForms)
{
}
I Love T-SQL
"VB.NET is developed with C#.NET"
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
hi,
the problem i accessing the reports from each form and saving it to one workbook
is it possible?
foreach(Form frm in this.MdiChildren) {
saving each report to a workbook
}
|
|
|
|
|
|
How To Convert The English To Gujarati in The Asp.net With C#
|
|
|
|
|
Language translation, even between similar languages (which Gujarati and English aren't) is not a facile task.I suggest you use an online service like google translate, or find a commercial product that does this. Even so, no translation software is 100% accurate.
|
|
|
|
|
This[^] is a fairly complete guide on this topic.
Its always easier to plan localization in advance (before development starts).
If the site already exists, it will be harder to implement localization.
|
|
|
|
|
|
Hi,
i work with asp.net c#, how can we insert multiple lines text (label) in a single row of datagridview?
Thank you verry mutch.
|
|
|
|
|
Probably by asking in the ASP.NET forum!
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
|
Hey All,
Just d/l your checkers game...http://www.codeproject.com/KB/game/DirectXBoardGameEngine.aspx[^]
However when I open it I am asked to convert it. When I try to build the game it says 'TypeLoadException was unhandled'
Method 'Initialize' in type 'Bornander.Games.Checkers.Direct3D.CheckersModelRepository' from assembly 'Bornander Games Checkers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
Please advise?
Thanks in advance
|
|
|
|
|
You haven't downloaded my code here, you've downloaded Frederik Bornander's code from that article. Funnily enough, there's a forum at the bottom of the article (all the articles have forums) where you can ask THE ORIGINAL AUTHOR about their code. After all, they are the experts in their code and they are best placed to answer your questions.
|
|
|
|
|
|
MSDN wrote: The ?? operator is called the null-coalescing operator and is used to define a default value for a nullable value types as well as reference types. It returns the left-hand operand if it is not null; otherwise it returns the right operand.
|
|
|
|
|
Thanks.
|
|
|
|
|
The ?? is known as the null coalescing operator. That's a fancy dance way of saying that it tests to see if the left hand side is null, and if it is, it uses the right hand side. What this is doing, in your example, is evaluate items to see if it's null, and if it is, it assigns a new list to it and returns that. In practical terms, this is the same as doing this:
if (items == null)
items = new List<Item>();
return items I have missed the addition of the Item instances to the array to simplify this example, but you should get the idea from it.
[Edit]The OP deleted the original message. It was:
public class Item
{
public double X { get; set; }
public double Y { get; set; }
public string Name { get; set; }
public string Color { get; set; }
}
public class ItemsFactory
{
private List items;
public IEnumerable Items
{
get
{
return items ?? (items = new List<item>()
{
new Item { Name = "One", X = 33, Y = 25, Color = "Red" }, new
new Item { Name = "Two", X = 44, Y = 99, Color"Blue" }
});
}
}
}
modified 14-Nov-11 6:11am.
|
|
|
|
|
You put it much better than MSDN!
It’s not because things are difficult that we do not dare, it’s because we do not dare that things are difficult. ~Seneca
|
|
|
|
|
Thanks Annie. That's because, unlike MSDN, I'm trying to educate.
|
|
|
|
|
Thanks
|
|
|
|
|
Why did you delete your question? Don't do that.
"I love deadlines. I like the whooshing sound they make as they fly by." (DNA)
|
|
|
|
|
I have edited my answer to show what the OP asked.
|
|
|
|
|
Dear developers.
I developed a simple app that has a report viewer which connects to SQL server 2008.
i need to deploy the application to a terminal where all users can open it using a Shortcut to the exe trough Citrix.
My last app was in vb there where no problems there I just copied the exe file to the terminal and created the shortcut and everything worked fine.
Now I am using c# and the exe file trough an exception that the report viewer not found.
I tried the publishing it using ClickOnce and it is working.
The Q is can I only use the exe file and not publish the app? Because the shortcut targets only the exe file
Tanks,
Pniel
|
|
|
|
|
I would like to know if the following code is written ok or is there a better way? If there is a better way, can you explain and/or point me to a reference I can use? Is the linq writing from one datacontext object to some data fields ok? Also is the try catch adequate?
I do know the code works since I stepped through the code.
I am asking the question is this is my first time working with linq to sql in a C# 2010 application and I am the only programmer at my company.
<pre> protected void Ready_Data(Attes att, AtsDataContext attDataContext)
{
try {
var results = from s in attDataContext.Attes_Schedules
where s.Pay_Month == att.Pay_Month_Date
select new
{
PayDate = s.Pay_Month,
CurCStopDate = s.Current_C_Stop_Date,
PriorCStopDate = s.Prior_C_Stop_Date,
RptsReceviedMonth = s.Rpts_Rec_Month,
};
foreach (var r in results)
{
att.Pay_Month_Date = r.PayDate;
att.Current_C_Stop_Date = r.CurCStopDate;
att.Prior_C_Stop_Date = r.PriorCStopDate;
att.C_Rpts_Rec_Date = r.RptsReceviedMonth;
}
}
catch (Exception ex)
{
lblErrorMsg.Text = "Attes Page Processing problem";
lblErrorMsg.Visible = true;
hold_Exception = ex;
}
}</pre>
|
|
|
|
|
results is a collection you are integrating over yet att is a single object. That means if you have five items in results att will only be assigned the values in the last item when this method returns. If you only want/need a single item then use Single or SingleOrDefault method, or First or FirstOrDefault if that makes sense for you data
No comment
|
|
|
|