示例#1
0
        private void btnCollection_Click(object sender, EventArgs e)
        {
            var admincollection = new AdminCollection();

            admincollection.Show();
            Hide();
        }
示例#2
0
        private void linklViewCollection_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            var admincollection = new AdminCollection();

            admincollection.Show();
            admincollection.showTabControl();
            Hide();
        }
示例#3
0
        private void btnCollect_Click(object sender, EventArgs e)
        {
            string Paid      = "Paid";
            string Collector = Login.setfirstname + " " + Login.setlastname;

            try
            {
                Connection.Connection.DB();
                Functions.Function.gen     = "INSERT INTO Collections(EventId, UserId, Status, CollectionDate, CollectedBy) VALUES('" + txtEventID.Text + "', '" + txtID.Text + "', '" + Paid + "', '" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff") + "', '" + Collector + "')";
                Functions.Function.command = new SqlCommand(Functions.Function.gen, Connection.Connection.con);
                Functions.Function.command.ExecuteNonQuery();
                MessageBox.Show("Collection saved.", "Saved", MessageBoxButtons.OK, MessageBoxIcon.Information);
                Connection.Connection.con.Close();
                var admincollection = new AdminCollection();
                admincollection.Show();
                admincollection.showTabControl();
                Hide();
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }