Example #1
0
        private void btnadd_Click(object sender, EventArgs e)
        {
            frmAdd fa = new frmAdd();

            fa.txtid.Visible = false;
            fa.ShowDialog();
            Form1_Load(null, null);
        }
Example #2
0
    private void btnCancel_Click(object sender, EventArgs e)
    {
        // Is there an active instance of frmAdd? If yes,
        // call SetPicture() with a copy of the image used by
        // this frmNew.
        frmAdd oFrm = frmAdd.Instance;

        if (oFrm != null)
        {
            oFrm.SetPicture(picNew.Image.Clone() as Image);
        }
    }
        private void btnThem_Click(object sender, EventArgs e)
        {
            var f  = new frmAdd(student);
            var rs = f.ShowDialog();

            if (rs == DialogResult.OK)
            {
                /* bdsQuaTrinhHocTap.DataSource =
                 *   LearningHistoryService.getHistoryLearningFromFile(pathHistory, student.Id);
                 * dgvQuaTrinhHocTap.DataSource = bdsQuaTrinhHocTap;*/
                updateTable(LearningHistoryService.getHistoryLearningFromFile(pathHistory, student.Id));
            }
        }
Example #4
0
        private void btnedit_Click(object sender, EventArgs e)
        {
            string v  = dataGridView1[0, dataGridView1.CurrentRow.Index].Value.ToString();
            ticket tc = new ticket();

            tc.id = Int32.Parse(v);
            DataTable dt = tc.selectone();
            frmAdd    fa = new frmAdd();

            fa.txtid.Visible  = true;
            fa.txtid.Text     = dt.Rows[0]["id"].ToString();
            fa.txtname.Text   = dt.Rows[0]["name"].ToString();
            fa.txtfamily.Text = dt.Rows[0]["family"].ToString();
            fa.txttel.Text    = dt.Rows[0]["tel"].ToString();
            fa.txtborn.Text   = dt.Rows[0]["born"].ToString();
            fa.ShowDialog();
            Form1_Load(null, null);
        }
 private void frmAdd_FormClosed(object sender, FormClosedEventArgs e)
 {
     // Form has been closed.
     s_oInstance = null;
 }
 // These event handlers are used to track if an frmAdd instance
 // is available. If yes, they update the private static reference
 // so that the instance is available to other forms.
 private void frmAdd_Load(object sender, EventArgs e)
 {
     // Form is loaded (not necessarily visible).
     s_oInstance = this;
 }
Example #7
0
    private void button2_Click(object sender, EventArgs e)
    {
        frmAdd add = new frmAdd();

        add.Show();
    }
Example #8
0
    public static void Main()
    {
        frmAdd add = new frmAdd();

        Application.Run(add);
    }