示例#1
0
        private void WelcomeScreen_Load(object sender, EventArgs e)
        {
            //IHelper excelHelper = new ExcelHelper(tbsRepository);
            //excelHelper.ImportData(@"C:\1_Lavanya\Workspace\ABBAsignment\Files\TwinkleBookStoreRecord1.xlsx");

            if (tbsRepository.GetUsers().Count == 0)
            {
                tbsRepository.AddUsers();
            }
        }
 /// <summary>
 /// this method adds default users into the database when the database is first created
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void WelcomeScreen_Load(object sender, EventArgs e)
 {
     try
     {
         if (tbsRepository.GetUsers().Count == 0)
         {
             tbsRepository.AddUsers();
         }
     }
     catch (SqlException ex)
     {
         MessageBox.Show(ex.Message, "SQL Connection ", MessageBoxButtons.OK);
         Application.Exit();
     }
 }