|
Your question is not clear.., for the delete/updation/adding conformation Message box logic is same..,
Use this below code is U R requirement is same as below...
if (MessageBox.Show("Are U Sure???") == MessageBoxButtons.OK)
// upload process here
else
// terminating process here
Thanks
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
Hello,
I have an excel file with a specefic characters, when i read the text from excel and write it on txt file, the text was on ????????, i do this :
<br />
workbook = excelApplication.Workbooks.Open(@"C:\1.xls", 0, false, 5, "", "", false, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "", true, false, 0, true, false, false);<br />
worksheet = (Microsoft.Office.Interop.Excel.Worksheet)workbook.Worksheets[1];<br />
<br />
string cell_nom = "";<br />
object cellObject_nom = null;<br />
<br />
for (int i = 2; i <= worksheet.UsedRange.Columns.Count; i++)<br />
{ <br />
<br />
range_nom = (Microsoft.Office.Interop.Excel.Range)worksheet.Cells[i, 2];<br />
cellObject_nom = range_nom.get_Value(null);<br />
cell_nom = (cellObject_adr5 == null ? "" : cellObject_adr5.ToString().Trim());<br />
<br />
Console.write (cell_nom);<br />
<br />
}<br />
the original text in excel file was Ангел Димитров Мисирджиев ,
Please help me,Thank you verry mutch
|
|
|
|
|
Hello,
I try fot :
<br />
byte[] l = Encoding.Default.GetBytes(cell_nom);<br />
string f = Encoding.UTF8.GetString(l);<br />
MessageBox.Show(f);<br />
<br />
But unfortunatly it doesn't work, there are always ??????????????, help me please, thank you verry mutch
|
|
|
|
|
Hi,
Can i able to change the installation URL without publish
eg;
i already publish to a URL and i need to change the URL with out open the solution or by without clicking publish, Can i give the URL in web.config or some other way?
Is it possible?
Thankyou
YPKI
|
|
|
|
|
hi,
I would like to make a program that deal with algorithm on graphs.
Which control should I use for drawing the graph - the nodes and edges?
Thanks,
Lune
|
|
|
|
|
You've been ridiculed already for asking this in the Lounge, but no one managed to mention how pointless the question is. Google will tell you and so will an article search here. Try c# graph as a subject. I'll leave the complex keyboard skilz and leet copying to you.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
|
I spent a lot of time researching this when I was trying to build an application to plot juggling state graphs.
In the end I decided that laying out the nodes was one of those jobs that's almost trivial for a human but an absolute nightmare for a computer. There are some OK algorithms for laying out the graphs ( a lot come from electronic circuit board design) but they will never work 100% for the task you are trying to achieve. I made the Nodes draggable and then let the user arrange them where they were wanted, it was far less coding effort than trying to auto sort anything more than a trivial graph.
Russ
|
|
|
|
|
here's what i do every now and then
<br />
STEP 1. switch.to.oracle.bat<br />
STEP 2. run unit test against Oracle db<br />
[visual inspection on NUnit user interface after to make sure things are okay]<br />
STEP 3. switch.to.mysql.bat<br />
STEP 4. run unit test against MySQL<br />
[visual inspection on NUnit user interface after to make sure things are okay]<br />
STEP 5. switch.to.mssql.bat<br />
STEP 6. run unit test against M$SQL<br />
[visual inspection on NUnit user interface after to make sure things are okay]<br />
question is, how can i automate this?
dev
|
|
|
|
|
Well write a unit test for each database...
public void TestOracleDB() {
...
}
public void TestMySqlDB() {
...
}
public void TestMSSQLDB() {
...
}
|
|
|
|
|
Hi again,
You could incorporate NUnit's logic in a test app and forgo the NUnit app itself.
I once did a small subset of NUnit; just supporting [TestFixture], [Test] and Assert.AreEqual takes some 100 lines of code, heavily using reflection.
BTW: You would still need a "using NUnit.Framework;" to reuse the types they have defined.
|
|
|
|
|
Hi to all ,
I am using ODBC connection to read from a excel sheet, but i am unable to read the first line of the excel sheet bcoz driver taking it as Header, i have some data in the first row how can i read it. And another problem is that i can not read the numbers from the excel sheet. These two problems i have solved with the OLEDB connection using HDR=No and IMEX=1 but how to solve this problem in ODBC... please Help me.
connectionString i am using :
Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=E:\newFile.xls;
Thank You
|
|
|
|
|
Hi again..
Im not very familiar with C# but i am wondering if its possible to change these codes to CHAR or String or even Boolean.
while (true)
{
// Divide by 80, get remainder
Random xRandom = new Random((int)(Cosmos.Hardware.Global.TickCount
+ Cosmos.Hardware.RTC.GetSeconds()));
int xMagicNo = xRandom.Next() % 80;
Debugger.Send("Magic Number is " + xMagicNo);
Console.WriteLine("I am thinking of a number between 0 and 80. What is it?\n");
while (true)
{
thanks.
|
|
|
|
|
I do not understand the question!
Which codes are you trying to change?
Is there more to read?
Why comment the unnecessary bit? (use xRandom.Next(80) and it will return a number between 0 and 79, just like your modulus)
Why use "% 80" and then expect 80 as a possible result?
BTW: If you use the "code block" button below, it will preserve your formatting, and make fragments easier to read, thus:
while (true)
{
Random xRandom = new Random((int)(Cosmos.Hardware.Global.TickCount
+ Cosmos.Hardware.RTC.GetSeconds()));
int xMagicNo = xRandom.Next() % 80;
Debugger.Send("Magic Number is " + xMagicNo);
Console.WriteLine("I am thinking of a number between 0 and 80. What is it?\n");
while (true)
{
|
|
|
|
|
Hi All,
i am busy trying to convert an int to a ReportWS.MonthlyDOWRecurrence, this is what i got
MonthlyDOWRecurrence pattern = new MonthlyDOWRecurrence();
pattern.WhichWeekSpecified = true;
pattern.WhichWeek = Convert.ToInt16(Combobox1.SelectedItem.Value);
but i always get the following error:
Cannot implicitly convert type 'int' to 'ReportWS.WeekNumberEnum'. An explicit conversion exists (are you missing a cast?)
In VB.Net it works if you say:
pattern.WhichWeek = CInt(Combobox1.SelectedItem.Value);
can someone please tell me how to correct this?
living life on the flip side
|
|
|
|
|
well i not familiar with the classes you are using but as the error is suggesting 'WhichWeek' is an enum value then you might want to try an enum parse. There should be an enum collection for the 'WhichWeek' type which will have a static Parse function.
Something like...
(WhichWeeks)WhichWeeks.Parse(typeof(WhichWeeks), Combobox1.SelectedItem.Value);
...I highly doubt that will work but hopefully you will get the idea of what you need to do
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
The answer is in the error message, just cast it:
pattern.WhichWeek = (ReportWS.WeekNumberEnum) ...
I assume this is C# (correctly) trying to ensure you are setting the enum to valid values only. (Your combo box can only return valid enum members, right?)
|
|
|
|
|
Try this:
pattern.WhichWeek = (ReportWS.WeekNumberEnum)System.Enum.Parse(typeof(ReportWS.WeekNumberEnum), Combobox1.SelectedItem.Value);
|
|
|
|
|
|
Do you want to insert the whole file into a field in the table? Or is your file a table (like a csv-file)?
First you have to write database access code to get a connection to the db...
Regards
Sebastian
|
|
|
|
|
|
For sql server
BLUK INSERT
For Oracle
SQLLDR
For MYSQL
INFILE
Use This Keywords to Search in Google.
Thanks
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
I find that some C# project is compiled with the makefile, so i want to know why use the makefile to compile it. Is it a best way to improve the programming skills?
What compiler do you use?
|
|
|
|
|
It makes no difference as far as I know, its generally down to the site standards and source control methods.
Fired.Fish.Gmail wrote: Is it a best way to improve the programming skills?
No, its not really that relevant any more than say using IE or FF for a browser.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Fired.Fish.Gmail wrote: What compiler do you use?
The compiler doesn't change whether you use a MakeFile, the IDE or an MSBuild project. It's always going to be csc.exe (for C#).
"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.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|