IPill pill;                             //stores pill when found

        public SearchPillForm(PillForm pillForm, ref PillDB pillDB, SearchType searchType)
        {
            InitializeComponent();

            this.pillForm   = pillForm;
            this.pillDB     = pillDB;
            this.searchType = searchType;
        }
        private PillDB pillDB;     //reference to the database

        public PillReportForm(PillForm pillForm, ref PillDB pillDB)
        {
            InitializeComponent();

            this.pillForm = pillForm;
            this.pillDB   = pillDB;

            InitializePillDataGridView();
        }
        PillDB pillDB;             //reference to pill database

        public AddPillForm(PillForm pillForm, ref PillDB pillDB)
        {
            InitializeComponent();

            this.pillForm = pillForm;
            this.pillDB   = pillDB;

            //allows for date time picker to accept both date and time
            creationTimeDateTimePicker.CustomFormat = "MM/dd/yyyy hh:mm:ss";
        }
        string pillOriginalImprint; //holds pill oroginal imprint in case that it is modified

        public ModifyPillForm(PillForm pillForm, ref PillDB pillDB, IPill pill)
        {
            InitializeComponent();

            this.pillForm = pillForm;
            this.pillDB   = pillDB;
            this.pill     = pill;

            //allows for date time picker to accept both date and time
            creationTimeDateTimePicker.CustomFormat = "MM/dd/yyyy hh:mm:ss";

            //moves pill information to the form
            imprintTextBox.Text              = pill.Imprint;
            colorComboBox.Text               = pill.Color;
            shapeComboBox.Text               = pill.Shape;
            drugNameTextBox.Text             = pill.DrugName;
            drugStrengthTextBox.Text         = pill.DrugStrength;
            selectImageTextBox.Text          = pill.Photo;
            creationTimeDateTimePicker.Value = DateTime.Parse(pill.CreationTimestamp);

            pillOriginalImprint = pill.Imprint;
        }
Exemple #5
0
        PillDB pillDB; //pill database

        public LoginForm()
        {
            InitializeComponent();
            pillDB = new PillDB();
        }
 private PillDB pillDB; //pill database instance
 public PillForm(ref PillDB pillDB)
 {
     InitializeComponent();
     this.pillDB = pillDB;
 }