Recent content by andrewmanuja

  1. A

    Question Update datagridview cell value changes to database in 3-tier architecture

    Hi jmcilhinney, Thank you very much for your valuable feedback. I am studying your solution at the moment and working on implementing in the Windows Form environment. Nevertheless, thank you very much once again and will get back to you if any clarifications required. Kind regards, Andrew
  2. A

    Question Update datagridview cell value changes to database in 3-tier architecture

    Hi jmcilhinney, Sorry, yes I assume that, need to send the parameter value for the "Select Item" also, since I am performing a validation in the Data Access Layer and accordingly saving the updates to the database table. Thank you. Kind regards,
  3. A

    Question Update datagridview cell value changes to database in 3-tier architecture

    Hi jmcilhinney, Thanks for your feedback. I have used the designer window and created the event by double clicking on the "btnUpdate" controller. Please refer the below code block private void btnUpdate_Click(object sender, EventArgs e) { foreach (DataRow row in...
  4. A

    Question Update datagridview cell value changes to database in 3-tier architecture

    Hi Skydiver, Can you please elaborate this bit more? Thanks. Andrew
  5. A

    inheritance problem..

    Hi Skydiver, Look, I am still a beginner for programming and of course will tend to make mistakes. I assume, any beginner would have done mistakes and people learn things by doing mistakes too. Thus, an expert's job shouldn't be to criticize people's mistakes and instead guide them. During...
  6. A

    Question Update datagridview cell value changes to database in 3-tier architecture

    Hi jmcilhinney, Thanks for your valuable feedback. Yes, I am using Data Transfer Objects in my application. According to my understanding, I wrote the below code under the Data Access Layer and it looks like; using (SqlConnection conn = new SqlConnection(_connStr)) using (var...
  7. A

    Question Update datagridview cell value changes to database in 3-tier architecture

    Hi All, I am currently working on getting Please find the respective Data Access Layer code below; public void UpdateUser(PersonDTO bPerson) { using (SqlConnection conn = new SqlConnection(_connStr)) using (var dCmd = new SqlCommand(@"UPDATE Person SET...
  8. A

    Question Unable to Cast Object Type in 3-Layer Architecture

    Hi Sheepings, I understand that it is not a good database design. My objective is not to make a good database design at this stage instead, I want to understand how the CRUD operations works in a 3-tier architecture and if I understand the programming concepts properly, I want to migrate an...
  9. A

    Question Unable to Cast Object Type in 3-Layer Architecture

    Hi All, I am trying to implement the update data record(s) from a data grid view to the database table. I got three Layers implemented and need to update changes to the data grid view data using a data table into my database table. In my Data Access Layer, the respective code looks like below...
  10. A

    Question Displaying data in dataGridView

    Hi jmcilhinney , Please find the attached project code herewith. The code related to the Data_Layer as follows; Note I have created the connection string in the AppConfig file and calling it in the Data_Layer. public class Connection { private string conn =...
  11. A

    Question Displaying data in dataGridView

    Hi jmcilhinney, What I am saying is, when I am running the code in the debugger mode adding a breakpoint, when I run the respective command line, dataGridViewProducts.DataSource = objLogic.LoadProduct(); and check the results just after executing the above command line, it shows the expected...
  12. A

    Question Displaying data in dataGridView

    Hi All, I am trying to get my head around how the 3-layer architecture works using a sample example. I am able to get the data on to the Presentation Layer, Form_Load event. Please refer my below code, ClassBusinessLayer objLogic; private void Product_Details_Load(object sender...
  13. A

    Answered Update multiple sql database tables using a single Data Table

    Hi jmcilhinney , Thank you very much for the guidance. Finally, was able to fix the issue ussing "adapter.AcceptCHangesDuringUpdate" property, correctly. Kind regards, Andrew
  14. A

    Answered Update multiple sql database tables using a single Data Table

    Hi jmcilhinney, Thanks for your quick respond. I did add the said AcceptChangesDuringUpdate property to false but no change in the expected outcome. Please refer my code below; SqlConnection connect = Connection.GetConnection(); table.AcceptChanges(); //Mark selected...
  15. A

    Answered Update multiple sql database tables using a single Data Table

    Hi, I got a Data Table which is generated at the Form_Load event. The data then populate in to a dataGridView. The user is allowed to add values to a dataGridView column (issueQuantity) and when saving the data, I want to update two tables in the SQL server. However, when I'm running the...
Top Bottom