Пример #1
0
        public void RealCost(string pfname, string pdes, string pnuni, string punic, string ptot, string peid)
        {
            con.Open();
            try
            {
                SqlCommand Cmd = new SqlCommand("INSERT INTO RCost (factorName, description, noOfUnits, unitCost, total,eid) VALUES (@1, @2, @3, @4, @5,@6)", con);

                Cmd.Parameters.AddWithValue("@1", pfname);
                Cmd.Parameters.AddWithValue("@2", pdes);
                Cmd.Parameters.AddWithValue("@3", pnuni);
                Cmd.Parameters.AddWithValue("@4", punic);
                Cmd.Parameters.AddWithValue("@5", ptot);
                Cmd.Parameters.AddWithValue("@6", peid);



                Cmd.ExecuteNonQuery();


                fexecu d = new fexecu();
                d.rcost();
                MessageBox.Show("Cost Added");
            }



            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            con.Close();
        }
Пример #2
0
        private void metroTile6_Click(object sender, EventArgs e)
        {
            fexecu f = new fexecu();

            f.Show();
            f.sendid(eid);
        }