Exemple #1
0
        public void frmPMT_Load(object sender, EventArgs e)
        {
            frmPMT fp = new frmPMT();

            fp.WindowState = FormWindowState.Maximized;
            DBConnect dbconnect = new DBConnect();

            dbconnect.connection.Open();
            MySqlCommand command = new MySqlCommand();

            command.Connection = dbconnect.connection;
            string qry;

            qry = "Select P.id, P.title, P.number, P.price,flag, (CASE WHEN F.part_name is null then 'NO_ Part' ELSE F.part_name end)as Part_name, F.Quantity  from ProductView P LEFT JOIN  FinalPrByPro F ON P.id = F.Product_id;";
            //"select  PV.id, PV.title, PV.number, PV.price,PV.flag, (case when FSV.Product_ID is null then 'Multiple' else FSV.part_name end) as part_name, Quantity from ProductView PV LEFT JOIN FindSingleVal FSV ON PV.ID = FSV.Product_ID Left join QuantityByProduct QP on PV.ID = QP.Product_ID;";

            command.CommandText = qry;

            DataTable        data    = new DataTable();
            MySqlDataAdapter adapter = new MySqlDataAdapter(command);

            adapter.Fill(data);

            dataGridView1.DataSource = data;
        }
Exemple #2
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            frmPMT fmPro = new frmPMT();

            fmPro.MdiParent   = this;
            fmPro.WindowState = FormWindowState.Maximized;
            fmPro.Show();

            fmPro.Focus();
        }
Exemple #3
0
        private void productToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmPMT fmPro = new frmPMT();

            fmPro.MdiParent   = this;
            fmPro.WindowState = FormWindowState.Maximized;

            fmPro.Show();

            fmPro.Focus();
        }