private void BtnEdit_Click(object sender, EventArgs e)
        {
            TransparentPosition b = new TransparentPosition();
            FrmAddPosition      a = new FrmAddPosition();

            try
            {
                a.label8.Text            = "Edit Position";
                a.lblpositionid.Text     = lblpositionid.Text;
                a.BtnAddPosition.Visible = false;
                con.Open();
                String       query = "select * from position where position_id = @id";
                MySqlCommand cmd   = new MySqlCommand(query, con);
                cmd.Parameters.AddWithValue("@id", lblpositionid.Text);
                MySqlDataReader dr = cmd.ExecuteReader();
                if (dr.Read())
                {
                    a.TxtPosition.Text = (dr["position"]).ToString();
                }
                dr.Close();
                con.Close();
                b.Show();
                a.ShowDialog();
                b.Hide();
            }
            catch
            {
                NotificationConnectionError c = new NotificationConnectionError();
                c.ShowDialog();
            }
        }
Example #2
0
        public void CloseTransparent()
        {
            TransparentPosition a = (TransparentPosition)Application.OpenForms["TransparentPosition"];

            a.Close();
            this.Hide();
        }
Example #3
0
        private void BtnAddPosition_Click(object sender, EventArgs e)
        {
            TransparentPosition a = new TransparentPosition();
            FrmAddPartylist     b = new FrmAddPartylist();

            a.Show();
            b.ShowDialog();
            a.Hide();
        }