Link to home
Start Free TrialLog in
Avatar of Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.Sc
Hankwembo Christopher,FCCA,FZICA,CIA,MAAT,B.A.ScFlag for Zambia

asked on

How to Create data input sheet in C#

Dear Experts!


Sorry to bother you again,

I'm trying to understand the Visual Studio very well, I have no much difficulties on code, but form organization and linkage is still a challenge.

I have created a MDI form as per code below, I have no issues on controls, a few issues on the following:

(1) How to create a datasheet form in windows form application for an invoice table found in my access database. Once I happy with the interface we will be using MS access as a Back End while the front end will be in C#
(2) The parent table has the following controls:

- tblinvoice
- ID
-InvoiceID
-CustomerID
-Date
-Salesman
-Branch
(3) Child 1 has the following:

-tbllinedetails
-ProductID
-Product Description
-QtySold
-Price
-Discounts
-VAT
-LineTotal

(4) Child 2 has the following
- tblsalesJournal
- date
- Dr
- Cr

(6) All the two child tables have datasheets, now how do I create the same datasheets in C# windows form application (input forms) so that people can capture data normally like they do in Ms Access

(7) Any sql to insert data using MS Access 2016?
(8) I understand we are required to drop the database in Visual Studio directory and link it from there, how is it done.

If the above issues can be sorted out then i'm almost done with C#.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApp1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            string firstName;
            firstName = textBox1.Text;
            MessageBox.Show(firstName);
        }

        private void invoiceDetailLineToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form2 frm2 = new Form2();
            frm2.Show();
            frm2.MdiParent = this;
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            IsMdiContainer = true;
        }

        private void salesAccountingToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Form3 frm3 = new Form3();
            frm3.Show();
            frm3.MdiParent = this;
        }
    }
}

Kindly ignore the click button it has nothing to with the issue above.


Regards

Chris
ASKER CERTIFIED SOLUTION
Avatar of it_saige
it_saige
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial