|
What is itext ? If your html is encrypted, how can you expect to make it into a PDF ? Why MUST the PDF be 10 pages ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
I have a dataset that contains information froma database. The database has 3 columns named GlobalId, LocalId and Name. Basically the GlobalId is Autoincrimented and the LocalId is not. When I create an entry I want to check if there's a LocalId, if not then add a LocalId, if there is a LocalId then select the last one and incriment that number by 1.
My code looks like this at the moment:
private void GenerateEmployeeID()
{
int employeeID = 0;
DataTable dt = dsWBGTS.Tables["Person"];
if (dt.Rows[0][1].ToString() == "")
{
employeeID++;
lblLocalIdResult.Text = employeeID.ToString();
}
}
How can I retrieve the last number in the LocalId column and incriment that number by one?
Thank you!!
Illegal Operation
|
|
|
|
|
Well, for the local id to have meaning, it should always exist in the DB, shouldn't it ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
And that is why I am having this issue, because the method I am implimenting in my application should get the last LocalId entry from the dataset and incriment it by 1. The Dataset contains the latest information from the DB so obviously the LocalId will be relevant to the DB.
Illegal Operation
|
|
|
|
|
If your application has only one user, ever, then there's no issue with data traffic. So, ask the database. If your app has more than one user, then this approach is a disaster, so you need to ask the database to assign a number, and create the record, so the number doesn't get used twice.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
you could do 'select' to get your last entry or have somewhere in your database where you keep localID value
Yusuf
|
|
|
|
|
The new id is probably an identity field in your data set. The best way to get the correct id value will be to commit the updates to the database, otherwise you will have concurrency issues.
If you really want to get the last id value from the DataTable look into the Select method.
|
|
|
|
|
first of all u get max of localid and then increament 1
|
|
|
|
|
i cannot understand...image index mean just a index of image or...it carry together with image also...???? i mean, is image index contain the image that related to index?????
if i call image index could i able to get the image????
A S E L A
|
|
|
|
|
|
|
Sit back and think as to what you want to do.
imagelist
A S E L A wrote: imagelist1.Images.Add(???????????????????)
what do you think 'Add' takes as parameter? It got to be an Image Object. Don't you think?
Now look at your
A S E L A wrote: foreach(listViewItem each in listView1.SelectedItems)
ListView is just a collection of, well, items. You got your selected index, kewl, now go get your Item. What kind of object is your item? Is it am image? if not not what do you need to do to convert it to Image? Now take that Image object and give it Add().
I'm not working on windows forms, but it does not take much to figure it out. What I said may not be entirely correct, but should give you general idea.
Yusuf
|
|
|
|
|
hi yusuf
thanks a lot to ur reply it perfect....
i need to ask one more question
on application run time....when i bring my curser to "each" it shows listview:- ListViewItem:{****(name of image)***.jpeg}
so can i use that to conver to image ???
actualy im new to programming....thanks 4 ur help....
A S E L A
|
|
|
|
|
A S E L A wrote: actualy im new to programming....thanks 4 ur help....
Buy a book on C#, read it, and start with the basics. Abandon what you're doing now, you obviously don't know enough to do it well. I assume you're not being paid for it ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Christian Graus
im tring to do is drag drop selcted images from imagelist in listViewBox into another imagelist which also im listViewBox.
my item drag can work
dag enter can work
and i have done rest all the thing...im just stuck in this part only....dragdrop part.....ya i already bought books and reading....and im willing to learn everything soon....
if u know the answer to my question pl tell me the answer...
one more how can i get the Image from ListViewItem each....???
A S E L A
modified on Tuesday, March 3, 2009 9:36 PM
|
|
|
|
|
You may want to go back and read what Christian wrote.
There is nothing wrong with been new and wanting to learn. But the way to learn is first to read and understand the basics.
Yusuf
|
|
|
|
|
Yusuf...
can u help me to conver ListViewItem each to an image...???
i must do this befor do the other things....
A S E L A
|
|
|
|
|
A S E L A wrote: can u help me to conver ListViewItem each to an image...???
I did, go back and read my posts
A S E L A wrote: i must do this befor do the other things....
send me your teachers email address. I will send him the code on your behalf.
Yusuf
|
|
|
|
|
i don't have teacher's e mail.....
by the way i don't want all of u....ill do it by self.....when i done ill post my code to public....
thanks 4 all of urs help....
A S E L A
|
|
|
|
|
A S E L A wrote: im tring to do is drag drop selcted images from imagelist in listViewBox into another imagelist which also im listViewBox
Either you're biting off more than you can chew, or you're trying to do paid work before you know your basics. Either way, stop it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
remeber....never give up anything untill today....every thing fine.....don't worry about that....k
A S E L A
|
|
|
|
|
|
Drag Drop Bitween two imageLists in listViewBoxes using ImageIndex....
foreach(listViewItem each in listView1.SelectedItems)
{
imagelist1.Image.Add(listView1.ImageList.Images[each.ImageIndex]);
}
A S E L A
|
|
|
|
|
for a project i have to use a database and create a form with it. ive created the form and layed it all out. i have to do sort and then a search feature. the sort part i haev done using the catolougebinding..... the search bit has to bring a new form up. i am able to bring a new form up but do not understand what code to write in there.
here is a link to what i haev to do which is in a pdf format - http://www.megaupload.com/?d=B34ISOYE[^]
that will also explain what i have to do.
any help will be really helpful.
thanks
Alex
|
|
|
|
|
saunders1989 wrote: but do not understand what code to write in there.
this[^] might help
Yusuf
|
|
|
|