|
For this situation, I do not recommend Autoincreament ID
I think simple Integer is suitable
And to manage the problem of client-server arch. I suggest the follwing scenario:
- Add new field of datatype bool to your Invoices table, name it "isReserved" , say
- Once a client initiates an invoice, it is saved with new ID (isReserved=false by default)
- if an invoice is completed and the client pressed save button, set isReserved=True , otherwise false
- any client will try to initiate new invoice will get the first invoice number saved with isReserved=false , if none, will get the new invoice number (max+1)
Mohammed Gouda
foreach(Minute m in MyLife)
myExperience++;
|
|
|
|
|
Ofcource the new invoice number = last invoice number + 1
So, get the maximum invoice number, increase it by 1, display the new number in the lable
Hobe this solve your problem
Mohammed Gouda
foreach(Minute m in MyLife)
myExperience++;
|
|
|
|
|
thnx my brother
Kareem Elhosseny
|
|
|
|
|
you welcome
Mohammed Gouda
foreach(Minute m in MyLife)
myExperience++;
|
|
|
|
|
Does your website ever have more than one user ? If so, then adding one to the top number will not work, you need to create an empty row to 'hold' that number for the current user.
Christian Graus
Please read this if you don't understand the answer I've given you. If you're still stuck, ask me for more information.
|
|
|
|
|
excuse me can u explain it more plz
Kareem Elhosseny
|
|
|
|
|
Hi all,
we have our own bulk email sending software. when we send email to our clients its stored in spam folder who have the yahoo id. so its a big problem for us. so any one have a good idea for avoiding this problem. i have tried our most. but result is same. So can any one?
Regards,
vidyasankar N
|
|
|
|
|
How about asking the customers to add you to their white list?
or to mark your emails as not spam?
|
|
|
|
|
Hi,
How i substract one datetime to an other and then divide the reults by 3
like this
08:00AM 07/05/2008 - 11:00AM 07/05/2008 /3
any help? its very urgent
Regards
Rameez
|
|
|
|
|
Hi,
Let’s consider two dates for example…
DateTime dtToday = DateTime.Parse("08:00AM 07/05/2008");
DateTime dtSomeDay = DateTime.Parse("11:00AM 07/05/2008");
Use this code to subtract.
TimeSpan ts = dtSomeDay.Subtract(dtToday);
int iDays = ts.Days;
int iHours = ts.Hours;
you will get the result in TimeSpan, there you decide which element of it you want to devide by the given value…
Hope its clear.
Thx,
Gayani
|
|
|
|
|
Hi,
How to add database name list (from sql server) into the dropdown box.
please guide me,
Thanks,
Murugavel
|
|
|
|
|
did you search before you post ?
I Wish the Life Had CTRL-Z
Wizard's First Rule : People are fool,they believe what they want to believe or what they afraid to believe
www.subaitech.blogspot.com
|
|
|
|
|
Hi,
Im not sure for how depth u except the answer, nor whether you have a layered architecture in place.
There are couples of ways of achiving this…
Let’s assume that I have database named TestDB and it has a Employee table which has, EmployeeNumber, Name and some other fields. My objective is to get the EmployeeIDs and Names and bind them to the control. The stored procedure ill be using is just a simple one as Select EmployeeNumber, Name from Employee and I will call this sp as Employee_Select.
Here is a quick way…
• Let’s configure a DataSource to your DropDownList.
When configuring a datasource, you need to select the database and connect to it and select the stored procedure you want to use to populate the data to the control. So here is the sample code for that.
<asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="dsTestSource" DataTextField="Name"
DataValueField="EmployeeNumber">
</asp:DropDownList><asp:SqlDataSource ID="dsTestSource" runat="server" ConnectionString="<%$ ConnectionStrings:TestDBConnectionString %>"
SelectCommand="Employee_Select" SelectCommandType="StoredProcedure"></asp:SqlDataSource>
Now let’s do it in a structured way…
1. Get the data from the Database.
a. Create a Sqlconnection object, and create a Sqlcommand and execute it agaist your database and use an adapter to fill the data to a DataTable.
Ex:
string sConnection = ConfigurationManager.ConnectionStrings["TestDBConnectionString"].ConnectionString;
SqlConnection Con = new SqlConnection(sConnection);
SqlCommand cmd = new SqlCommand();
cmd.Connection = Con;
cmd.CommandType = CommandType.StoredProcedure;
cmd.CommandText = "Employee_Select";
SqlDataAdapter adp = new SqlDataAdapter(cmd);
DataTable dtValues = new DataTable();
adp.Fill(dtValues);
2. Bind it to the control.
DropDownList1.DataSource = dtValues;
DropDownList1.DataTextField = "Name";
DropDownList1.DataValueField = "EmployeeNumber";
DropDownList1.DataBind();
You may write the above code in a method and call it when you need to fill the control.
Hope its clear to you..
Thx,
Gayani
modified on Saturday, July 5, 2008 4:26 AM
|
|
|
|
|
Execute the stored procedure sp_databases in master database. Then bind the returned result( say its a datatable of name dt) with the dropdown list like this:
<DropDownList>.DataTextField="Database_Name";
<DropDownList>.DataValueField="Database_Name";
<DropDownList>.DataSource=dt;
<DropDownList>.DataBind();
Regards,
Wasif.
|
|
|
|
|
Hey any one know that how to convert .dll file into .cs or .vb files?
plz dont say that its not possible
|
|
|
|
|
Its done with the help of a decompiler. Although decompilers can fetch exact code, some dll`s can be obfuscated at compliation so that it becomes very difficult to decompile.
you can find more at
here[^]
These tools are mainly used for reverse engineering.
May i know why do u wan`t it.????
When you fail to plan, you are planning to fail.
|
|
|
|
|
Hello friends
My aim is to show a please wait screen till the background work is done
For this i have used ajax update progress pannel
so i have placed a div in it now when the background is busy the div is visible but its behind my controls ..
if any one knows how to do this please let me know ..i am at the end of project
thanks
If You win You need not Explain............
But If You Loose You Should not be there to Explain......
|
|
|
|
|
in "Style" collection of that DIV control , put "z-index" property value to some very high value like 500 or 1000. It will be visible.
z-index is a controls property avaiable into style collection of a control( like height, width.)
Thanks,
Arindam D Tewary
|
|
|
|
|
Hai,
I have an asp page,which has three other included files,
1.How can I convert this page into an asp.net page
2.Can I include an asp page with some global constants into an aspx page.
3.What are the common possibilities to include other aspx files into an aspx file?
Please help.
|
|
|
|
|
How to create web form at runtime?
|
|
|
|
|
ss2050 wrote: How to create web form at runtime?
Your question doesn't made any sense. You need to rephrase it. Read this[^]
|
|
|
|
|
I need to know that --"when i click on any button it automatically generate(create new web form) a seperate web form which doesnt exist in project anywhere.
|
|
|
|
|
ss2050 wrote: I need to know that --"when i click on any button it automatically generate(create new web form) a seperate web form which doesnt exist in project anywhere.
What is your actual requirement?
Have you ever seen this type of functionality in any website?
This is not better way to add form.
If you can explain your requirement the we can help you.
Regard
Khan
please don't forget to vote on the post that helped you.
|
|
|
|
|
ya i have seen such type of functionality in forums creation.
I know very well that it is possible.
If u know then tell me
|
|
|
|
|
Who told u that they create new pages dynamically and how did u identified that????
In ASP.NET its not only difficult, or rather i would say its impossible. Who will complile those pages??? Are u willing to develop an online complier...
First clear your DBMS basics of how data should be stored and retrived in such cases. Don`t just ask silly questions if you don`t have any idea about it.
When you fail to plan, you are planning to fail.
|
|
|
|