/// <summary> /// Loads a cleansed file that was generated from the PatronsIngestion user control /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_LoadCleansedFile_Click(object sender, EventArgs e) { //use an OpenFileDialog object to get the new file OpenFileDialog ofd = new OpenFileDialog(); //create a new open file dialog for getting the new file //open up the dialog for the user to choose a new file if (ofd.ShowDialog() == DialogResult.OK) { //then a file was chosen, this is the file that will be loaded DB_Storage.LoadCleansedFile(ofd.FileName); //load the cleansed file into the local DB //setup the new interface to have a representation of all the inhabitants of the graveyard List <Plot> lpl_Plots = DB_Storage.GetAllPlots(); //get all of the plots that were just loaded foreach (Plot pl in lpl_Plots) //go through each plot that was just loaded { //sa_Line contains the line of text that will be displayed to the user string[] sa_Line = { pl.pers.s_FirstName, pl.pers.s_MiddleName, pl.pers.s_LastName, pl.s_Section, pl.s_Id, pl.pers.s_DODDate, pl.sl_Notes.ElementAt(0) }; lstv_Patrons.Items.Add(new ListViewItem(sa_Line)); //add the patron to the UI } } }
private new void Update() { DB_Storage = new DB_Storage(); comboxEngineCapacity.DataSource = DB_Storage.GetCapacity(); comboxDoors.DataSource = DB_Storage.GetDoors(); comboxSeats.DataSource = DB_Storage.GetSeats(); comboxModel.DataSource = DB_Storage.Models; comboxCarcase.DataSource = DB_Storage.Carcases; comboxCountry.DataSource = DB_Storage.Countries; comboxBrand.DataSource = DB_Storage.Brands; comboxTypeEngine.DataSource = DB_Storage.Engine_types; comBoxPlace.DataSource = DB_Storage.Engine_places; addModelBrand.DataSource = DB_Storage.Brands; comboxPayType.DataSource = DB_Storage.Payment_types; comBoxCities.DataSource = DB_Storage.Cities; comBoxClients.DataSource = DB_Storage.Clients; //BrandSaleSelect.DataSource = DB_Storage.Brands; TotalSumGridView.DataSource = DB_Sale_Query.GetTotalSum(""); productsView.DataSource = DB_Product_Query.GetAllProducts(); }
private int i_MaxHeight; //the maximum height of the window #endregion frm_GraveyardManager Variables #region public frm_GraveyardManager() /// <summary> /// frm_GraveyardManager() /// The constructor for the main form /// </summary> public frm_GraveyardManager() { LogManager.Init(Properties.Settings.Default.s_LoggingPath); //intialize the LogManager for logging LogManager.WriteLine(""); //write a line LogManager.WriteLine("Boot -- GraveyardManager application is now starting"); InitializeComponent(); this.Resize += Frm_GraveyardManager_Resize; fws_LastState = this.WindowState; //set the window state rect_InitialState = new Rectangle(this.Location, this.Size); //create a new rectangle which indicates the default size of the form rect_PnlInitialState = new Rectangle(pnl_MainView.Location, pnl_MainView.Size); //create a new rectangle which indicates the default size of the panel i_MaxWidth = Screen.PrimaryScreen.WorkingArea.Width; //get the width of the main screen i_MaxHeight = Screen.PrimaryScreen.WorkingArea.Height; //get the height of the main screen this.MaximumSize = new Size(i_MaxWidth, i_MaxHeight); //set the maximum size of this form this.pnl_MainView.Size = this.uC_Display1.Size; //set the size of the panel this.pnl_MainView.Resize += Pnl_MainView_Resize; DB_Storage.Init(); //initialize the database #if DEBUG Point po_DebugLoc = this.Location; //set the location for the new debug window po_DebugLoc.Y = po_DebugLoc.Y + this.Size.Height; //adjust the width to be right beside the MainForm window DebuggingUI dui = new DebuggingUI(); //create the new form dui.Location = po_DebugLoc; //set the new location of the debug window dui.Show(); #endif }