private void btnOrdHome_Click_1(object sender, EventArgs e) { adminDash ad = new adminDash(); ad.Show(); this.Visible = false; }
private void btnCashBack_Click(object sender, EventArgs e) { adminDash ad = new adminDash(); ad.gVBal.Refresh(); ad.gVBalDet.Refresh(); ad.gVPenOrd.Refresh(); this.Close(); }
public void cusId() { SqlConnection cusCon = new SqlConnection(prodcs); try { cusCon.Open(); SqlCommand cusCmd = cusCon.CreateCommand(); cusCmd.CommandType = CommandType.Text; cusCmd.CommandText = "Select * from cusTB where cusId = '" + tbCusID.Text + "'"; SqlDataReader dr = cusCmd.ExecuteReader(); if (dr.Read()) { string first = (dr["Firstname"].ToString()); string mid = (dr["Midname"].ToString()); string last = (dr["Lastname"].ToString()); MessageBox.Show("Customer Found!", " Success", MessageBoxButtons.OK, MessageBoxIcon.Information); if (MessageBox.Show("Customer Name: " + last + ", " + first + " " + mid + " ... Continue?", " Verify", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { lblCusID.Text = tbCusID.Text; gBCusID.Visible = false; gbCashCusCre.Visible = true; } else { return; } } else { if (MessageBox.Show("ID Not Found, Add New Customer? ", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) { lblResCusID.Text = tbCusID.Text; tbCusID.Text = ""; adminDash ad = new adminDash(); ad.Show(); this.Visible = false; } else { return; } } } catch (Exception e) { MessageBox.Show(e.Message, " Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }