private void BtnInvoices_Click(object sender, EventArgs e) { if (!AdminAdministrator.Instance.PnlContainer.Controls.ContainsKey("AdminInvoices")) { AdminInvoices inv = new AdminInvoices(); inv.Dock = DockStyle.Fill; AdminAdministrator.Instance.PnlContainer.Controls.Add(inv); inv.ShowAllInvoices(); inv.PopulateCustomerNameCombobox(); } AdminAdministrator.Instance.PnlContainer.Controls["AdminInvoices"].BringToFront(); AdminAdministrator.Instance.BackButton.Visible = true; }
private void BtnBackToInvoice_Click(object sender, EventArgs e) { AdminAdministrator.Instance.PnlContainer.Controls.Clear(); if (!AdminAdministrator.Instance.PnlContainer.Controls.ContainsKey("AdminInvoices")) { AdminInvoices inv = new AdminInvoices(); inv.Dock = DockStyle.Fill; AdminAdministrator.Instance.PnlContainer.Controls.Add(inv); inv.ShowAllInvoices(); } AdminAdministrator.Instance.PnlContainer.Controls["AdminInvoices"].BringToFront(); AdminAdministrator.Instance.BackButton.Visible = true; BtnBackToInvoice.Visible = false; }
public AdminCancelInvoiceVerifier(AdminInvoices voice) { InitializeComponent(); cn = new SqlConnection(dbcon.MyConnection()); bunifuDatepicker1.Value = DateTime.Now; bunifuDatepicker2.Value = DateTime.Now; // Pass the value of date picker to invoice date label InvoiceDate = bunifuDatepicker1.Value.ToString("MMM-dd-yyyy"); bunifuCustomLabel1.Text = InvoiceDate; // Pass the value of date picker to sales date label SalesDate = bunifuDatepicker2.Value.ToString("MMM-dd-yyyy"); bunifuCustomLabel2.Text = SalesDate; inv = voice; }
public void RefreshInvoiceRecords() { AdminInvoices invoice = new AdminInvoices(); // get the path of the image Image img = Image.FromFile(@"C:\Users\Arjie\source\repos\AHKPOSENKTHESIS MASTER\AHKPOSENKTHESIS WIP\AHKPOSENKTHESIS\bin\Debug\Icons\invoice_approved.png"); int i = 0; invoice.dataGridView1.Rows.Clear(); cn.Open(); cm = new SqlCommand("SELECT * FROM tblInvoiceRecords WHERE customer like '%" + invoice.txtSearch.Text + "%' order by invoiceno desc", cn); dr = cm.ExecuteReader(); while (dr.Read()) { i++; invoice.dataGridView1.Rows.Add(i, img, dr["id"].ToString(), dr["invoiceno"].ToString(), dr["customer"].ToString(), dr["address"].ToString(), dr["salestotal"].ToString(), dr["discount"].ToString(), dr["vat"].ToString(), dr["vatable"].ToString(), dr["total"].ToString(), dr["payment"].ToString(), dr["days"].ToString(), dr["billaddress"].ToString(), dr["datecreated"].ToString(), dr["duedate"].ToString(), dr["status"].ToString(), dr["remarks"].ToString(), dr["prvcomment"].ToString()); } dr.Close(); cn.Close(); }