コード例 #1
0
 public DepositPage(User aUser)
 {
     dateOpened    = DateTime.Now;
     myCurrentUser = aUser;
     InitializeComponent();
     dbContext = new L2S_FoodBankDBDataContext(ConfigurationManager.ConnectionStrings["FoodBankInventoryManager.Properties.Settings.FoodBankDBConnectionString"].ConnectionString);
 }
コード例 #2
0
        public ItemsMaintenancePage(User aUser)
        {
            myCurrentUser = aUser;
            dbContext     = new L2S_FoodBankDBDataContext(ConfigurationManager.ConnectionStrings["FoodBankInventoryManager.Properties.Settings.FoodBankDBConnectionString"].ConnectionString);

            InitializeComponent();
        }
コード例 #3
0
 public ModifyFoodWindow(string aFoodName, int aMinQty)
 {
     myFoodName = aFoodName;
     oldMinQty  = aMinQty;
     dbContext  = new L2S_FoodBankDBDataContext(ConfigurationManager.ConnectionStrings["FoodBankInventoryManager.Properties.Settings.FoodBankDBConnectionString"].ConnectionString);
     InitializeComponent();
 }
コード例 #4
0
 /// <summary>
 /// Constructs an Audit Page
 /// </summary>
 /// <param name="aUser">User that is currenty using the page</param>
 public AuditPage(User aUser)
 {
     InitializeComponent();
     myCurrentUser = aUser;
     //linq2sql database data context object: allows you to modify application's database with linq
     dbContext = new L2S_FoodBankDBDataContext(ConfigurationManager.ConnectionStrings["FoodBankInventoryManager.Properties.Settings.FoodBankDBConnectionString"].ConnectionString);
 }
コード例 #5
0
 /// <summary>
 /// Constructs a bin maintenance window object
 /// </summary>
 /// <param name="aUser">User currently logged in</param>
 public BinMaintenance(User aUser)
 {
     InitializeComponent();
     myCurrentUser = aUser;
     binList       = new List <string>();
     isChanged     = false;
     dbContext     = new L2S_FoodBankDBDataContext(ConfigurationManager.ConnectionStrings["FoodBankInventoryManager.Properties.Settings.FoodBankDBConnectionString"].ConnectionString);
 }
コード例 #6
0
 /// <summary>
 /// Constructs a create account window object
 /// </summary>
 public CreateAccountWindow()
 {
     InitializeComponent();
     nonEmptyFields = new Dictionary <string, bool>();
     dbContext      = new L2S_FoodBankDBDataContext(ConfigurationManager.ConnectionStrings["FoodBankInventoryManager.Properties.Settings.FoodBankDBConnectionString"].ConnectionString);
     myAccount      = new User();
     emailIsInvalid = false;
     readyToSubmit  = true;
 }
 /// <summary>
 /// Constructs a deletion management window object
 /// </summary>
 /// <param name="aUser">User that is currently logged in</param>
 /// <param name="anEntry">Entry item that will be looked at (a food that is in multiple bins)</param>
 /// <param name="isScanned">Whether the user got to this page through scanning a bin code</param>
 public DeletionManagementWindow(User aUser, InventoryInfo anEntry, bool isScanned)
 {
     myCurrentUser     = aUser;
     selectedEntry     = anEntry;
     this.isScanned    = isScanned;
     individualEntries = new List <InventoryInfo>();
     lastKeyPress      = new DateTime(0);
     dbContext         = new L2S_FoodBankDBDataContext(ConfigurationManager.ConnectionStrings["FoodBankInventoryManager.Properties.Settings.FoodBankDBConnectionString"].ConnectionString);
     InitializeComponent();
 }
コード例 #8
0
 public InventoryReportingPage(User aUser)
 {
     InitializeComponent();
     txtHidden.Focus();
     myCurrentUser    = aUser;
     lastKeyPress     = new DateTime(0);
     textStream       = new List <string>();
     currentInventory = new List <InventoryInfo>();
     watchList        = new List <MinWatchInfo>();
     dbContext        = new L2S_FoodBankDBDataContext(ConfigurationManager.ConnectionStrings["FoodBankInventoryManager.Properties.Settings.FoodBankDBConnectionString"].ConnectionString);
 }
コード例 #9
0
        public ScannerEmulator(User aUser)
        {
            dateEntered   = DateTime.Now;
            dbContext     = new L2S_FoodBankDBDataContext(ConfigurationManager.ConnectionStrings["FoodBankInventoryManager.Properties.Settings.FoodBankDBConnectionString"].ConnectionString);
            invEntry      = new InventoryEntry();
            myCurrentUser = aUser;

            lastKeyPress  = new DateTime(0);
            textStream    = new List <string>();
            readyToSubmit = true;
            oldEntry      = false;
            InitializeComponent();

            //txtTemp.Focus();
        }
コード例 #10
0
 public LoginPage()
 {
     InitializeComponent();
     dbContext = new L2S_FoodBankDBDataContext(ConfigurationManager.ConnectionStrings["FoodBankInventoryManager.Properties.Settings.FoodBankDBConnectionString"].ConnectionString);
 }
コード例 #11
0
 /// <summary>
 /// Constructs a food submit window object
 /// </summary>
 /// <param name="foodName">food name that is being added to the food table of the database</param>
 public FoodSubmitWindow(string foodName)
 {
     myFoodName = foodName;
     dbContext  = new L2S_FoodBankDBDataContext(ConfigurationManager.ConnectionStrings["FoodBankInventoryManager.Properties.Settings.FoodBankDBConnectionString"].ConnectionString);
     InitializeComponent();
 }
コード例 #12
0
 public ScannerEmulatorDelete()
 {
     rand      = new Random();
     dbContext = new L2S_FoodBankDBDataContext(@"Data Source=DESKTOP-ABVBM4U\SQLEXPRESS;Initial Catalog=FoodBankDB;Integrated Security=True");
     InitializeComponent();
 }