_________________________________________________________
Start 9.30 a.m.
_________________________________________________________
Ahh, feeling super un-motivated today, had really bad little sleep last night and now i'm sitting in a cold room at work. Want to go back to bed not do homework haha. ANWAYS... i will be carrying on with interface /sigh.
2 hours.
Welcome
I'm a student and this blogg has been created to keep information on a daily to weekly basis about my project that i am doing to get my Bachelor of Information Technology. This is based on my progress, and a place to put all of my information, not entirely a proper blogg. Though sometimes i feel like i'll be talking to myself... Any ways, enjoy and feel free to comment. If your wondering what this project is and dont want to read every single post, just go to the Proposal link, or any of the "posts worth looking at" below.
Saturday, May 24, 2008
Friday, May 23, 2008
23/5 yawn
_________________________________________________________
Start 9.00 a.m.
_________________________________________________________
This morning ive just figured out how to use all the grid views etc for filling in data straight from the dictionarys, so i can list all the data and make the primary key a link to open a page of that certain record, so just doing that for all of the forms now.
_________________________________________________________
Finish 7.00 p.m. - 7 hours
_________________________________________________________
Start 9.00 a.m.
_________________________________________________________
This morning ive just figured out how to use all the grid views etc for filling in data straight from the dictionarys, so i can list all the data and make the primary key a link to open a page of that certain record, so just doing that for all of the forms now.
_________________________________________________________
Finish 7.00 p.m. - 7 hours
_________________________________________________________
Thursday, May 22, 2008
22/5 UML, Interface & Meeting
_________________________________________________________
Start 9.00 a.m.
_________________________________________________________
Heres the latest version of my UML diagram... may be some things wrong, tired and dont want to spend too much time on it at this stage, just want to portray what ive actually programmed thus far. Its starting to turn into spaghetti!!!
I have project meeting today at 1.30 p.m. Just want to get some more interface stuff done before then. I also have class at 4.00 p.m. so after project meeting i might spend that time up until 6.00 p.m. when i finish class to do some more catching up then spend all night carrying on with project.
So far this week i have sorted out the data side of things, almost, i'm not quite as far as i would have liked to be. I'm gonna blame this on wasting 5 hours doing pretty much nothing cause of problem yesterday. What i would have liked to have done by now was filling in all grid views, and editing, deleting and inserting the data from this. Maybe tonight i'll finish this off. My next job, to finish off the basics of the interface, is to sort out the editing of specific client addresses etc, but having that list below the client details.
Well good luck to me, wont update post until tonight when i get more time.
Start 9.00 a.m.
_________________________________________________________
Heres the latest version of my UML diagram... may be some things wrong, tired and dont want to spend too much time on it at this stage, just want to portray what ive actually programmed thus far. Its starting to turn into spaghetti!!!
I have project meeting today at 1.30 p.m. Just want to get some more interface stuff done before then. I also have class at 4.00 p.m. so after project meeting i might spend that time up until 6.00 p.m. when i finish class to do some more catching up then spend all night carrying on with project.
So far this week i have sorted out the data side of things, almost, i'm not quite as far as i would have liked to be. I'm gonna blame this on wasting 5 hours doing pretty much nothing cause of problem yesterday. What i would have liked to have done by now was filling in all grid views, and editing, deleting and inserting the data from this. Maybe tonight i'll finish this off. My next job, to finish off the basics of the interface, is to sort out the editing of specific client addresses etc, but having that list below the client details.
Well good luck to me, wont update post until tonight when i get more time.
Just got back from project meeting, was good, mmm cup of tea. Below is a screen shot of the job data showing in a grid view. Please dont laugh at my awesome design skills. I'm just going to carry on with reading in the data for everything else now. I had a problem with reading in the jobs because the names of variables i was sending into the stored procedure were actually different to the ones in the stored procedure itself.
************************************************************************
Class 4.00 p.m. 6.00 p.m. - Project Management
************************************************************************
Class 4.00 p.m. 6.00 p.m. - Project Management
************************************************************************
Blerg, tired, gonna play some wow then sleep.
_________________________________________________________
Finish 10.00 p.m. 7 hours.
_________________________________________________________
Wednesday, May 21, 2008
21/5 Fixing Stupid Probem & Carrying on with Interface Stuff
_________________________________________________________
Start 9.00 a.m.
_________________________________________________________
OK, its tea time, finally some time to blogg!!
I spent 5 hours today trying to figure out the error i got yesterday (read bottom of yesterdays post), and in the end after way too much research and asking for help from Alliyahh my sister to no avial, i tried doing this:
public void getClientList()
{Array lcArray = myService.getClientList();
Dictionary lcClientList = Global.clientList;?foreach (serviceMain.clsClient item in lcArray)
{
serviceMain.clsClient serviceClient = item;
string clientID = serviceClient.propertyClientID;
string clientName = serviceClient.propertyName;
clsClient lcClient = new clsClient(clientID, clientName);
lcClientList.Add(clientID, lcClient);
}
}
By using the serviceClient.Property and accesing this field it worked. I am going to be honest i have no idea how this really works, i stepped through and going over where the property is being assigned it didnt step into the service, so i'm assuming that its pulling this field from the array that has been passed in. But hey at least i got some where and now have data to use.
The funny thing is i spent so much time researching if anyone else had my problem, and only found a couple of posts that were similar but didnt have a solution. Well either way, what i was doing wrong was basically summed up in this post, "you are casting an object of type X to an object of type Y, and the twotypes are not compatible." What i'm thinking is that they are sort of the same type, but yea not really haha. Either way, whether this is bad practise or not? i have NO IDEA, but yea, at the moment all i am concerned about is getting the data to the client side and fill in the dictionarys so i can use them for the filling in of lists.
After i finaly fixed that issue i moved onto the code for filling in the rest of the lists. I have also wrote the code for inserting a record for management and client addresses, the reason this is more special is because the ID is generated by SQL server when a record is created, so i dont pass in the identifier (clientAddressID, managementAddressID) in but have to insert the rest of the columns into the database and then grab the ID and pass it back to the list server side, the the interface. I dont no the way most people go about the issue so i just did it like that, how i thought it would work logically.
For the rest of the night i will start filling data into the grid views, and figure out how to edit & delete etc. I also will update the UML diagram at some stage tonight or tomorow to reflect what ive changed so far.
_________________________________________________________
Finish 9.30 p.m. 11 hours
_________________________________________________________
Links:
http://www.themssforum.com/Csharp/property-array/
http://www.java2s.com/Code/CSharp/Language-Basics/Indexerallowarraylikeindex.htm
http://www.dotnet247.com/247reference/msgs/58/290679.aspx
http://www.dotnet247.com/247reference/msgs/39/196536.aspx
http://ryanfarley.com/blog/archive/2004/05/26/737.aspx
http://www.programmersheaven.com/2/XML-Webservice-FAQ-Pass-Array-Of-Custom-Objects http://www.developer.com/net/asp/article.php/3657826
http://blogs.msdn.com/markjo/archive/2006/09/05/740893.aspx
http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.aspnet.webservices/2005-06/msg00068.html
http://yassers.com/content/book/chapters/chapter9.htm
http://www.dotnet247.com/247reference/msgs/58/291597.aspx
Start 9.00 a.m.
_________________________________________________________
OK, its tea time, finally some time to blogg!!
I spent 5 hours today trying to figure out the error i got yesterday (read bottom of yesterdays post), and in the end after way too much research and asking for help from Alliyahh my sister to no avial, i tried doing this:
public void getClientList()
{Array lcArray = myService.getClientList();
Dictionary
{
serviceMain.clsClient serviceClient = item;
string clientID = serviceClient.propertyClientID;
string clientName = serviceClient.propertyName;
clsClient lcClient = new clsClient(clientID, clientName);
lcClientList.Add(clientID, lcClient);
}
}
By using the serviceClient.Property and accesing this field it worked. I am going to be honest i have no idea how this really works, i stepped through and going over where the property is being assigned it didnt step into the service, so i'm assuming that its pulling this field from the array that has been passed in. But hey at least i got some where and now have data to use.
The funny thing is i spent so much time researching if anyone else had my problem, and only found a couple of posts that were similar but didnt have a solution. Well either way, what i was doing wrong was basically summed up in this post, "you are casting an object of type X to an object of type Y, and the twotypes are not compatible." What i'm thinking is that they are sort of the same type, but yea not really haha. Either way, whether this is bad practise or not? i have NO IDEA, but yea, at the moment all i am concerned about is getting the data to the client side and fill in the dictionarys so i can use them for the filling in of lists.
After i finaly fixed that issue i moved onto the code for filling in the rest of the lists. I have also wrote the code for inserting a record for management and client addresses, the reason this is more special is because the ID is generated by SQL server when a record is created, so i dont pass in the identifier (clientAddressID, managementAddressID) in but have to insert the rest of the columns into the database and then grab the ID and pass it back to the list server side, the the interface. I dont no the way most people go about the issue so i just did it like that, how i thought it would work logically.
For the rest of the night i will start filling data into the grid views, and figure out how to edit & delete etc. I also will update the UML diagram at some stage tonight or tomorow to reflect what ive changed so far.
_________________________________________________________
Finish 9.30 p.m. 11 hours
_________________________________________________________
Links:
http://www.themssforum.com/Csharp/property-array/
http://www.java2s.com/Code/CSharp/Language-Basics/Indexerallowarraylikeindex.htm
http://www.dotnet247.com/247reference/msgs/58/290679.aspx
http://www.dotnet247.com/247reference/msgs/39/196536.aspx
http://ryanfarley.com/blog/archive/2004/05/26/737.aspx
http://www.programmersheaven.com/2/XML-Webservice-FAQ-Pass-Array-Of-Custom-Objects http://www.developer.com/net/asp/article.php/3657826
http://blogs.msdn.com/markjo/archive/2006/09/05/740893.aspx
http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.aspnet.webservices/2005-06/msg00068.html
http://yassers.com/content/book/chapters/chapter9.htm
http://www.dotnet247.com/247reference/msgs/58/291597.aspx
Tuesday, May 20, 2008
20/5 Passing Lists & Interface
_________________________________________________________
Start 9.00 a.m.
_________________________________________________________
ahhhh so early. Just carrying on with same stuff as yesterday.
I got the passing of the arrays back working :D thanks to an awesome cheeky mohnkey. I asked what he normally does as i had read alot of people just apss back a dataset, and he said to pass back an array of the class, and just .ToArray the list.
[WebMethod]
public clsClientAddress[] getClientAddressList()
{
dbConnection lcConnection = new dbConnection();
lcConnection.getClientAddressList();
List lcClientAddressList = Global.clientAddressList;
return lcClientAddressList.ToArray();
}
So by passing the list converted to an array we can then grab it by assigning the result to an array of objects. What i was doing wrong from lack of knowledge was getting the data type of the array i was assigning it to wrong. After a bit of playing around i guess this and it worked so huray.
protected void btnGo_Click(object sender, EventArgs e)
{
serviceMain.serviceMain myService = new serviceMain.serviceMain();
object[] lcArray = myService.getClientList();
}
What my goal now is, to get the arrays back and pass the values into the dictionarys of the client. Once i have done this i can fill my data grids with data and work on the editing and deleting.
************************************************************************
Break 11.15 a.m. - 11.45 a.m.
************************************************************************
_________________________________________________________
Class 2.00 p.m. - 6 p.m. - going to study for project management and go to class.
_________________________________________________________
Having break in class... what better time to blogg. Today i had an issue with everytime i grabbed the list it would get bigger and bigger. Now in the application start on the service under the global class it makes a new list, SO theoretically everytime it starts it should create a new list? Well it was re-adding items from the database to the list and making the list large with duplicates, I found this out by stepping through and seeing that the list wasnt clearing. I'm not exactly sure how the application start works, so i thought i'd be safe and clear the lists before filling them again.
dbConnection lcConnection = new dbConnection();
Global.clientAddressList.Clear();
lcConnection.getClientAddressList();
List lcClientAddressList = Global.clientAddressList;
return lcClientAddressList.ToArray();
So that will do for now, in future the logic and process of how this works will change, as is it will all be called differently, but was probly a problem i was going to face either way.
************************************************************************
Break 6.00 p.m. 10.30 p.m.
************************************************************************
Having a problem now with using the array that i get back from service what i'm trying to do:
Will figure it out tomorow... if i dont soon i am screwed ^^. Perhaps below answers my question. http://www.themssforum.com/Csharp/property-array/. Either way i have to figure out how to get to fields, or fix the error i have... which is the lesser of the two evils... I shall sleep on it.
Start 9.00 a.m.
_________________________________________________________
ahhhh so early. Just carrying on with same stuff as yesterday.
I got the passing of the arrays back working :D thanks to an awesome cheeky mohnkey. I asked what he normally does as i had read alot of people just apss back a dataset, and he said to pass back an array of the class, and just .ToArray the list.
[WebMethod]
public clsClientAddress[] getClientAddressList()
{
dbConnection lcConnection = new dbConnection();
lcConnection.getClientAddressList();
List
return lcClientAddressList.ToArray();
}
So by passing the list converted to an array we can then grab it by assigning the result to an array of objects. What i was doing wrong from lack of knowledge was getting the data type of the array i was assigning it to wrong. After a bit of playing around i guess this and it worked so huray.
protected void btnGo_Click(object sender, EventArgs e)
{
serviceMain.serviceMain myService = new serviceMain.serviceMain();
object[] lcArray = myService.getClientList();
}
What my goal now is, to get the arrays back and pass the values into the dictionarys of the client. Once i have done this i can fill my data grids with data and work on the editing and deleting.
************************************************************************
Break 11.15 a.m. - 11.45 a.m.
************************************************************************
_________________________________________________________
Class 2.00 p.m. - 6 p.m. - going to study for project management and go to class.
_________________________________________________________
Having break in class... what better time to blogg. Today i had an issue with everytime i grabbed the list it would get bigger and bigger. Now in the application start on the service under the global class it makes a new list, SO theoretically everytime it starts it should create a new list? Well it was re-adding items from the database to the list and making the list large with duplicates, I found this out by stepping through and seeing that the list wasnt clearing. I'm not exactly sure how the application start works, so i thought i'd be safe and clear the lists before filling them again.
dbConnection lcConnection = new dbConnection();
Global.clientAddressList.Clear();
lcConnection.getClientAddressList();
List
return lcClientAddressList.ToArray();
So that will do for now, in future the logic and process of how this works will change, as is it will all be called differently, but was probly a problem i was going to face either way.
************************************************************************
Break 6.00 p.m. 10.30 p.m.
************************************************************************
Having a problem now with using the array that i get back from service what i'm trying to do:
Dictionary lcClientList = Global.clientList; object[] lcArray; lcArray = myService.getClientList();
int length = lcArray.Length;
for (int i = 0; i <>
{
clsClient lcClient = (clsClient)lcArray[i];
string lcClientID = lcClient.propertyClientID;
lcClientList.Add(lcClientID, lcClient);
}
I'm tryign to assign the array object to a clsClient, but i think its some how more difficult than just doing this. Below is a picture of the error i'm getting and also shows the object i get back. This is really noob but after spending ages trying to firgure out how, i dont know if/how i can just grab out the field of that array item, probly simple, but hey it eludes me. If i can just grab the data from this object then i dont have to worry about all this converting crap and can just using the fields. SIGH.
_________________________________________________________
Finish 12.15 p.m. 7 hours
_________________________________________________________
Finish 12.15 p.m. 7 hours
_________________________________________________________
Will figure it out tomorow... if i dont soon i am screwed ^^. Perhaps below answers my question. http://www.themssforum.com/Csharp/property-array/. Either way i have to figure out how to get to fields, or fix the error i have... which is the lesser of the two evils... I shall sleep on it.
Monday, May 19, 2008
19/5 Starting slowly on Interface
_________________________________________________________
Start 9.00 a.m.
_________________________________________________________
I was just having an issue with the management business name not updating because of "The UPDATE statement conflicted with the REFERENCE constraint". What i forgot to do was set the cascade update and delete. Will do that now.
Management(businessName) --> cascade update --> ManagementAddress(businessName)
client(clientID) --> cascade update & delete --> clientAddress(clientID)
user(userID) --> cascade update --> job(clientID)
Because management is only inserted once, then updated, each time this is updated it needs to update the business name in the addresses also. If the client id is changed (i dont see why this would happen) then the addresses of that client will also need to be updated, as well as, if the client is deleted, all of the addresses will likewise be deleted. If the odd case of the user assigned to a job is changed, i have made it so that this will also cascade update.
So i fixed all of my problems (i'll update problem page) besides this stupid passing of lists. I made a class to convert the list into a multi dimensional array to pass back... stoopid me, cant even pass those lol. After reading this article and a few others http://www.west-wind.com/WebLog/posts/368.aspx i realised that people seem to be just passting datasets... I am going to wait until another time to get advice about this and move onto the interface stufffff.
************************************************************************
Break 4.00 p.m. - 5.00 p.m. gone for walk
************************************************************************
Ive worked a little more on the list/array issue, will talk more about that tonight or tomorow when i figure out if its gonna work. The rest of the day i spent making the master form, the sitemap, and implementing the website security. I made the forms for adding clients, users, client addresses, management addresses and jobs. Tomorow i will carry on with passing the lists and filling the grid views with this data, hopefully if i dont have any problems i will also get deleting and editing done. I have class tommorow night though, so have to catch up on some project management, ah well, will see how it goes. Raiding time!
_________________________________________________________
Finish 9.00 p.m. 11 hours
_________________________________________________________
Start 9.00 a.m.
_________________________________________________________
I was just having an issue with the management business name not updating because of "The UPDATE statement conflicted with the REFERENCE constraint". What i forgot to do was set the cascade update and delete. Will do that now.
Management(businessName) --> cascade update --> ManagementAddress(businessName)
client(clientID) --> cascade update & delete --> clientAddress(clientID)
user(userID) --> cascade update --> job(clientID)
Because management is only inserted once, then updated, each time this is updated it needs to update the business name in the addresses also. If the client id is changed (i dont see why this would happen) then the addresses of that client will also need to be updated, as well as, if the client is deleted, all of the addresses will likewise be deleted. If the odd case of the user assigned to a job is changed, i have made it so that this will also cascade update.
So i fixed all of my problems (i'll update problem page) besides this stupid passing of lists. I made a class to convert the list into a multi dimensional array to pass back... stoopid me, cant even pass those lol. After reading this article and a few others http://www.west-wind.com/WebLog/posts/368.aspx i realised that people seem to be just passting datasets... I am going to wait until another time to get advice about this and move onto the interface stufffff.
************************************************************************
Break 4.00 p.m. - 5.00 p.m. gone for walk
************************************************************************
Ive worked a little more on the list/array issue, will talk more about that tonight or tomorow when i figure out if its gonna work. The rest of the day i spent making the master form, the sitemap, and implementing the website security. I made the forms for adding clients, users, client addresses, management addresses and jobs. Tomorow i will carry on with passing the lists and filling the grid views with this data, hopefully if i dont have any problems i will also get deleting and editing done. I have class tommorow night though, so have to catch up on some project management, ah well, will see how it goes. Raiding time!
_________________________________________________________
Finish 9.00 p.m. 11 hours
_________________________________________________________
Subscribe to:
Posts (Atom)