private void btnCollection_Click(object sender, EventArgs e) { var admincollection = new AdminCollection(); admincollection.Show(); Hide(); }
private void linklViewCollection_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { var admincollection = new AdminCollection(); admincollection.Show(); admincollection.showTabControl(); Hide(); }
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); } }