Ejemplo n.º 1
0
        private void btnBack_Click(object sender, EventArgs e)
        {
            int        statusID   = Convert.ToInt32(lblStatusID.Text);
            AdminRanks adminRanks = new AdminRanks(lblYearID.Text, lblYear.Text, statusID, lblStatus.Text);

            adminRanks.Show();
            this.Close();
        }
Ejemplo n.º 2
0
        private void btnCreate_Click(object sender, EventArgs e)
        {
            if (txtNewRankName.Text == "" || txtNewRankSalary.Text == "")
            {
                MessageBox.Show("Please fill up the form!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }

            else
            {
                decimal RankSalary = Convert.ToDecimal(txtNewRankSalary.Text);
                int     StatusID   = Convert.ToInt32(lblStatusID.Text);
                int     YearID     = Convert.ToInt32(lblYearID.Text);

                myData.AddRank(txtNewRankName.Text, RankSalary, YearID, txtRankCode.Text); //Parameters to pass to DataAccess class

                MessageBox.Show("Rank Added!", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);

                AdminRanks adminRank = new AdminRanks(lblYearID.Text, lblYear.Text, StatusID, lblStatus.Text);
                adminRank.Show();
                this.Close();
            }
        }