private void btnMDCreate_Click(object sender, EventArgs e) { string errorDetails = string.Empty; if (TrDBTableCreate.CreateDataTables(conn, ref errorDetails)) { MessageBox.Show("Tables are created and Master data is inserted into trdatav1 database"); } else { MessageBox.Show(errorDetails); } }
private void btnDeleteDAta_Click(object sender, EventArgs e) { DialogResult dResult = MessageBox.Show("Are you sure to delete master data and tables", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (dResult.ToString().Equals("No")) { return; } string errorDetails = string.Empty; if (TrDBTableCreate.DropAllTables(conn, ref errorDetails)) { MessageBox.Show("All Master tables are deleted from trdatav1 database"); } else { MessageBox.Show(errorDetails); } }