can you please help me anyone to fix my coding errors?

Posted by Sudheep.grandhe under C# on 12/23/2011 | Points: 10 | Views : 1028 | Status : [Member] | Replies : 10
Hi,

here iam attaching new invoice form in this without filling the details in the textbox.if i click on the update,print,delete it shows the messages update,delete,print successfully and in gridview .if i add the details it shown in the gridview.if the user wants to remove any particular field or modifying field .the delete button and update button it wont work properly.validations are not working properly.please do the needful.

Best,
Sudheep.



Responses

Posted by: Suvendu on: 12/25/2011 [Member] Starter | Points: 25

Up
0
Down
Sudheep,
You have to be more specific while asking a question. I have gone through your doc and found no such real problem in the code but I want to suggest you that you should use comment lines so that the code written by you can be understood by another programmer.

If I am not wrong, if you are saying there is a bug then I feel it must be generating some exception..just find out that and reply here..or, attach the pages (both aspx and cs).

Thanks.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 12/27/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

Thanks for replying to me.As you said i am attaching the screenshots.please find those errors in the screenshots.please do the needful.
 Download source file

Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naraayanan on: 12/28/2011 [Member] Starter | Points: 25

Up
0
Down
hi,
Please follow when you are developing
1) use try ,catch statement in your every function.
2) Declare a common connection string .call that connection string in your every method/function.
3) In Your database, assign Primary key(Invoice).
4) close a connection
5) validate in click event of update button(eg: If( txtInvoice.text !="" || txtInvoice.text !=null) { // Do something} else { error message }


Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 12/28/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

Thanks for replying to me.if i did the validations in update click event.If the user without entering the details he made a click on update button it shows the alert message.But,if the user enters some data and then click on the update button also it shows the same alert messages.please do the needful.

Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naraayanan on: 12/29/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,
Could you send your code. or debug your project

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 12/29/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

here i am attaching error document.please find it.please do the needful.
 Download source file

Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naraayanan on: 12/29/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,
Please fill the answer:
1) Update an information in One Table (Yes/No):
2) which field is your primary key?
3) number values are int/double in your table(eg:Quality,Net Amount, Vat Amount,total amount,per price and Amount)
4) Please tell me How could you validate in the Update Button?
5) Please check your table any values are inserted.
6) what is mean by Update? -- Update means some changes made in existing value. am i right? how can you get the Existing values?





Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 12/29/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

Thanks for replying to me.Here is my answers for your questions.Please find it.please do the needful

1) Update an information in One Table (Yes/No):Yes
2) which field is your primary key?-Invoice no(pk) in tbl_report2 and invoiceno(fk) in tbl_report1
3) number values are int/double in your table-netamount-float,netvat-float,tamount-float,quantity-float,perprice-float,amount-float
4) Please tell me How could you validate in the Update Button?-i wrote the bool validate () and calling in the update button click event
5) Please check your table any values are inserted.-in table values are inserted
6) what is mean by Update? -- Update means some changes made in existing value. am i right? how can you get the Existing values?
Yes,I agree with you here my requirment is like if we are enter the details in the form and click on add button it should display in gridview.if the added details are wrong in that case there itself we have to update the data in gridview


Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naraayanan on: 12/30/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,
Problem in your validate function .please check it

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sudheep.grandhe on: 12/30/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

Thanks for replying to me.It's working properly only.it shows the alert messages also before update operations also.can you please show my error in validation.

Best,
Sudheep.

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response