|
Maybe you could help me then. I want to write an ERP (Enterprise Resource Planning)system , Can you please give me the code for that?
|
|
|
|
|
Give me five minutes to whip it up, and then I'll mail it to you. I can paste it into CP and email it, right ? I mean, that works for you ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
just make sure that when you paste the code in email, the formatting would not be messed out
|
|
|
|
|
hey bolt Christian Graus,
I didn't ask u to give the whole code for that.
If u know about TRIM, then give some tips.
If u don't know Shutup anf getlost
|
|
|
|
|
how to insert two values from two dropdownlist into one column in sql
day month year into single parameter..
i tried this but not working..
any sample code plz..
string str = Convert.ToString(DropDownList5.SelectedItem.Value) + Convert.ToString(DropDownList6.SelectedItem.Value)+Convert.ToString(DropDownList7.SelectedItem.Value);</pre>
parameter to insert into database..
<pre> cmd.Parameters.Add("@startdate", SqlDbType.SmallDateTime).Value = str;
|
|
|
|
|
By this
string str1=dropdownlist1.selectedvalue.tostring();
string str2=dropdownlist2.selectedvalue.tostring();
string strFinal=str1+str2;
and now you insert strFinal in database.
|
|
|
|
|
madhukk wrote: tried this but not working..
So why is it not working? You need to tell us how - although I suspect the str that you create in the first line is not a valid date format.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
if i use only one ddl, value is inserted into database.
im getting the following error if used three ddl's
Failed to convert parameter value from a String to a DateTime.
string str = DropDownList5.SelectedValue.ToString();
string str1 = DropDownList6.SelectedValue.ToString();
string str2 = DropDownList7.SelectedValue.ToString();
string final = str + str1 + str2;
cmd.Parameters.Add("@startdate", SqlDbType.SmallDateTime).Value = final;
|
|
|
|
|
Because, like I hinted in my previous post, the string you build is NOT in a valid date format. Try using the debugger and see for yourself.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
yes it is may be due to not parsing the atr in datetime format.
you can try this
str=datetime.parse(str);
then you insert the str
|
|
|
|
|
final = DateTime.Parse(final);
error:Cannot implicitly convert type 'System.DateTime' to 'string'
datetime final1=DateTime.Parse(final);
String was not recognized as a valid DateTime.
|
|
|
|
|
yes your string is not in a valid date time format you can do this by
string final=str1+"-"+str2+"-"+str3;
final=datetime.parse(final).tostring();
|
|
|
|
|
|
Despite me telling you a *better* way, you'll go with the way where you don't have to do any work, you can just copy the code you were given ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
You could be stupid for your country.
That you even tried both of these things tells me you have no idea what you're doing. Stop now, buy a book and read it.
As the other guy said, you need to create a valid date time object. A better solution, is to grab the numbers directly from the drop lists, and build the date time that way.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
C# can not convert type 'string' to 'DateTime'.
You can use a datepicker or other date select controls, which can be easily found on the internet.
And you can check the format "dd-MM-yyyy" by regular expressions.
modified 27-May-14 5:27am.
|
|
|
|
|
i want to upload a file using a batch file and check the upload staus from asp.net code. please suggest me the proper command line argument in batch file.
mannu
|
|
|
|
|
This is idiotic. You obviously have no idea what you're doing. I told you this in the C# forum. Your 'ASP.NET' code runs on the server, by definition. No client side code can run batch files OR upload files. Only a file selection control, with the user selecting files, can do that.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i have already written a code in c# to call a batch file and in batch file i written the code to transmit the file.
Even i got success to pass parameter to batch file from c# code .
But the problem is that i am not able to do error handling with it means i dont have idea if the batch file not able to transmit the file then how to handle the error or how i wiil get the response.
mannu
|
|
|
|
|
MB_1981 wrote: i have already written a code in c# to call a batch file and in batch file i written the code to transmit the file.
Even i got success to pass parameter to batch file from c# code .
Sounds great. But, what does that have to do with ASP.NET ? I mean, your C# code is not going to run on the client, nor is your batch file going to be on the client. Sounds to me like you're not smart enough to realise that your dev machine is both client and server, so you can write stuff that works there, but won't work when someone is browsing the web and looking at your site.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
there is no server side or client side concept with Executing batch file.
mannu
|
|
|
|
|
OK, so now I just think you're an idiot. You said you had an ASP.NET question in the C# forum, and you got told to come here. Now you say that your question has nothing to do with a server or client side concept ? Are you totally confused as to what ASP.NET is, and just had a .NET question ? Or are you still confused about what a web app can and can't do on the client side ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
are you here for chating or for knowledge. ???
mannu
|
|
|
|
|
At this point, I am staying up for my own amusement. If you asked a sensible question, I'd happily answer it. Right now, I can't work out what the hell it is you're trying to do, but you're very confused somewhere. I would put to you that anyone else who reads what you posted, will give the answers I gave, so you need to explain at what point it is that you meant to ask something other than what you said, if you want a real answer.
Or you can just do what most people do. Ask the same senseless question again in a few days and in the meantime, tell the guy who is paying you $3 a day that work is going well.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
i think you are not familiar with exe or com objects.
mannu
|
|
|
|