示例#1
0
        private void button15_Click(object sender, EventArgs e)
        {
            this.Hide();
            ProfitManagement7 p7 = new ProfitManagement7();

            p7.Show();
        }
示例#2
0
        public void insertDetails()
        {
            string employeeid     = textemployeeid.Text; //ASSIGNING THE VALUES
            string employeename   = textemployeename.Text;
            string employeeamount = textemployeeamount.Text;

            if (Mode == true)
            {
                sql = "insert into Enter_Salary_Details (employeeid,employeename,amount)values(@employeeid,@employeename,@amount)";//INSERT DATA TO Enter_Salary_Details TABLE
                con.Open();
                cmd = new SqlCommand(sql, con);

                cmd.Parameters.AddWithValue("@employeeid", employeeid);
                cmd.Parameters.AddWithValue("@employeename", employeename);
                cmd.Parameters.AddWithValue("@amount", employeeamount);
                cmd.ExecuteNonQuery();

                sql = "insert into PROFIT (emp_id , salary_for_employees)values(@employeeid , @amount)";//INSERT DATA TO TOTAL_PROFIT TABLE
                cmd = new SqlCommand(sql, con);

                cmd.Parameters.AddWithValue("@employeeid", employeeid);
                cmd.Parameters.AddWithValue("@amount", employeeamount);
                cmd.ExecuteNonQuery();
            }
            else
            {
            }

            con.Close();

            this.Hide();
            ProfitManagement7 p7 = new ProfitManagement7();

            p7.Show();
        }