private void button4_Click(object sender, EventArgs e) { DialogResult confirmResult = MessageBox.Show("Are you sure want to perform Master Reset in DB ", "Master Reset DB", MessageBoxButtons.YesNo, MessageBoxIcon.Error); if (DialogResult.Yes == confirmResult) { frmAuthentiation adm = new frmAuthentiation(); DialogResult res = adm.ShowDialog(); if (DialogResult.Yes == res) { if (PartNumberRepository.ResetInventoryItemsToZero()) { MessageBox.Show("Successfully Reset Invetory Items", "Reset Inventory", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Unable to Reset the Inventory", "Reset Inventory", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } }
private void button4_Click(object sender, EventArgs e) { DialogResult confirmResult = MessageBox.Show("Are you sure want to perform Master Reset in DB ", "Master Reset DB", MessageBoxButtons.YesNo, MessageBoxIcon.Error); if (DialogResult.Yes == confirmResult) { frmAuthentiation adm = new frmAuthentiation(); DialogResult res = adm.ShowDialog(); if (DialogResult.Yes == res) { if (PartNumberRepository.ResetInventoryItemsToZero()) { MessageBox.Show("Successfully Reset Invetory Items", "Reset Inventory", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("Unable to Reset the Inventory", "Reset Inventory", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } }