|
I understand the problem you are looking at. It's a trade off as either way you are going to end up with possible maintenance issues later.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Technically, extension methods require an instance of the data type being extended as the first parameter so you can't create a "true" static method on the actual type. You'll need to continue using a static helper class/method or create an extension method and call it from the instance of the array you want to search for the value.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
Hi there.
I sometimes see Annotations method in XML LINQ.
Can you tell me what this is and what we can do by it ?
|
|
|
|
|
Hi,
How can i edit or call single cells in tableLayoutPanel like in Ms Excell?
(or other kind of panel)
Thanks!!!
|
|
|
|
|
You are using the wrong control. Use DataGridView.
|
|
|
|
|
I use the datagrid to get data from the sql server.
I will trie to use the datagrid for other purposes.
Thanks
|
|
|
|
|
You can edit cell in DataGridView. But you cannot edit data in TableLayoutPanel. Because that are only panels.
|
|
|
|
|
Hi all,
I have a project i'm currently working on and would desire to send and receive sms with a SQL Server 2000 back end data store. My application will be able to query the database, return the results and send it through the Ozeking sms gateway API.
I need to know if this is possible with SQL Server 2000 and the direction to take please.
Thanks in advance.
Obinna from Nigeria.
//obinnaaj Eof
|
|
|
|
|
hi obinna,
I think you are in wrong forum,
but all you mention above is possible to do, as i know if you have text from or to your sms gateway, you can store them in many ways including sql server 2000.
hope it help
dhaim
program is hobby that make some money as side effect
|
|
|
|
|
Hi.
I want to convert a XML file to the String[].
I used this code :
String[] xml = File.ReadAllLines("bookmark.xml", Encoding.UTF8)
there are some characters (like these : 
 
) that didn't convert.
How can I convert these characters to the original characters.
|
|
|
|
|
Don't. Use an XmlDocument; it makes life much earier.
|
|
|
|
|
Thank you.
But I force using above way
|
|
|
|
|
|
|
Before you say it - I haven't voted your answer down!
PIEBALDconsult wrote: Use an XmlDocument
I've seen you use that response before. You really should have a look at System.Xml.Linq.XDocument .
Dave
|
|
|
|
|
I think it's too soon to assume that everyone has switched to .NET 3.5.
|
|
|
|
|
Are you sure that the bookmark.xml file is written using the UTF-8 encoding?
To find out which encoding is used, open the file with a hex viewer (I use xvi32) and look at the first 3 or 4 bytes (before the xml prolog: "http://en.wikipedia.org/wiki/Byte_Order_Mark[^].
If the file has nothing before the xml prolog, then try opening it in Notepad, and then select File->Save As. In the dialog box look at the encoding Notepad detected. It might not be UTF-8, thus your problem would have an explanation.
|
|
|
|
|
blackjack2150 wrote: Are you sure that the bookmark.xml file is written using the UTF-8 encoding?
I'm sure that my file is UTF-8 .
|
|
|
|
|
Hi,
I struggling here, i have a messy solution but i think is a bad pratice.
I have a application with 1 form and 6 usercontrols, the form has 1 ToolStrip (top) and 1 StatusStrip (down), everything else loads inside the form from the usercontrols.
My ploblem is that i can´t edit the toolStrip and the statusStrip menus by
coding in the usercontrols.
i remembered the "passing data between form method" but a couldn´t change it enought to perform what i want, since you have to create a new form ( etc etc form2 otherform = new form2(); etc etc)
i want to change the toolStrip and statusStrip menus as i enter diferent usercontrols.
Can anyone help me here?
|
|
|
|
|
I'm directly passing the crystal reports parameters through the code, and generating the report but for some obvious reason, I want the records to be stored first of all into a 2-dimensional array and from there writing it back onto Crystal reports.
The actual code before storing it in 2D-array is as given below:
private void btnReport_Click(object sender, System.EventArgs e)
{
try
{
makeReport(report_file);
for (int recordCount=0; recordCount <= myTable.Rows.Count; recordCount++)
{
SetParamValue("@parameter1", myTable.Rows[recordCount]["CLNT#"].ToString());
SetParamValue("@parameter2", myTable.Rows[recordCount]["CNAME"].ToString());
SetParamValue("@parameter3", myTable.Rows[recordCount]["CSEX"].ToString());
SetParamValue("@parameter4", myTable.Rows[recordCount]["CSS#"].ToString());
crystalReportViewer1.ReportSource = ReportDoc;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "EXCEPTION");
}
}
private void SetParamValue (string paramName, string paramValue)
{
for(int i=0;i < ReportDoc.DataDefinition.FormulaFields.Count; i++)
if(ReportDoc.DataDefinition.FormulaFields[i].FormulaName=="{" + paramName + "}")
{
ReportDoc.DataDefinition.FormulaFields[i].Text = "\"" +paramValue +"\"";
}
crystalReportViewer1.ReportSource = ReportDoc;
}
private void makeReport(string ReportFile)
{
ReportDoc.Load(ReportFile);
}
Note : The reason why I'm looking for 2D array is that currently upon execution I'm getting a Crystal Report with repeated records and that too upto the no. of maximum records in table. To be more clear, I'm getting the first record printed 30,000 times. NEED HELP........!!!
|
|
|
|
|
reality_strikes wrote: To be more clear, I'm getting the first record printed 30,000 times.
What? That's your problem and your question is how to do something with a 2D array? I don't get it?
led mike
|
|
|
|
|
led, wht is it tht u didnt understood in this..............i'm struck @ something and need help to move forward.......
|
|
|
|
|
ok, let me make it more clear.........lets say, i have an access database with 100 records and whn i generate the crystal report i'm expecting all 100 records to be displayed row-by-row.
Instead I'm getting the first record repeated 100 times.........u shud have got it by now........
|
|
|
|
|
ROTFLMA Thanks dude, that's the first good laugh I've had today. See what I am thinking is that they didn't design Crystal reports to print out the first row of your table 30,000 times so it's likely your code is incorrect somewhere.
Hey check this out man. I've never used Crystal Reports but I bet the following portions of your code just aren't correct because there is no need to assign the .ReportSource property for every single row and for every single parameter in your table. It also doesn't make sense that you have to set report parameters for every single row in your table.
What do you think? Are you using some tutorial or something or are you just guessing how to use Crystal Reports?
reality_strikes wrote: The actual code before storing it in 2D-array is as given below:
private void btnReport_Click(object sender, System.EventArgs e)
{
try
{
makeReport(report_file);
for (int recordCount=0; recordCount <= myTable.Rows.Count; recordCount++)
{
SetParamValue("@parameter1", myTable.Rows[recordCount]["CLNT#"].ToString());
SetParamValue("@parameter2", myTable.Rows[recordCount]["CNAME"].ToString());
SetParamValue("@parameter3", myTable.Rows[recordCount]["CSEX"].ToString());
SetParamValue("@parameter4", myTable.Rows[recordCount]["CSS#"].ToString());
crystalReportViewer1.ReportSource = ReportDoc;
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "EXCEPTION");
}
}
private void SetParamValue (string paramName, string paramValue)
{
for(int i=0;i < ReportDoc.DataDefinition.FormulaFields.Count; i++)
if(ReportDoc.DataDefinition.FormulaFields[i].FormulaName=="{" + paramName + "}")
{
ReportDoc.DataDefinition.FormulaFields[i].Text = "\"" +paramValue +"\"";
}
crystalReportViewer1.ReportSource = ReportDoc;
}
led mike
|
|
|
|
|
led, thanks for the reply. But now i'm facing a rather strange problem............when i replace my code with the changes u made in it.........this is what i'm getting :
I'm getting the first row repeated 30,000 times then the crystal report screen blinks and loads the 2nd line of record from database and displays it 30,000 times and it goes on like the same until it displays all the 30,000 records the same way.
now do u have any clue...........i have tried all this earlier itself..........awaiting reply........
|
|
|
|