public DailyRawMixForm() { InitializeComponent(); hideAddingIngredient(); listOfLabelsToRemove = new List<Control>(); listOfIngredients = new List<Dry_Ingredient_Use_Temp>(); ctx = new PWIC_TEST_ONEEntities(); today = DateTime.Today; btnLoadClicked = false; listToPrint = new List<string>(); this.setBtnLoadEnalbed(); }
private void BatchPreparationForm_FormClosing(object sender, FormClosingEventArgs e) { using (PWIC_TEST_ONEEntities ctx = new PWIC_TEST_ONEEntities()) { ctx.Database.ExecuteSqlCommand("delete from dbo.Raw_Mix_Batch"); } }
private void BatchPreparationForm_Load(object sender, EventArgs e) { ctx = new PWIC_TEST_ONEEntities(); try { list = ctx.Dry_Ingredient_Use_Temp.ToList(); } catch(Exception ex) { MessageBox.Show("Please Restart The Application"); ErrorLog log = new ErrorLog(); log.createLogFile(ex); } }
private void RecipeManager_Load(object sender, EventArgs e) { ctx = new PWIC_TEST_ONEEntities(); populateRecipeName(); }
private void populateIngredientDropDown() { string strCategory = cmbCategory.Text.ToString(); List<string> list; using (PWIC_TEST_ONEEntities ctx = new PWIC_TEST_ONEEntities()) { list = ctx.ingredients.Where(o => o.category == strCategory).Select(o => o.ingredient1).Distinct().ToList(); } BindingList<string> bindingList = new BindingList<string>(list); BindingSource source = new BindingSource(bindingList, null); cmbIngredient.DataSource = source; }
private void populateCategory() { List<string> list; using (PWIC_TEST_ONEEntities ctx = new PWIC_TEST_ONEEntities()) { list = ctx.ingredients.Select(o => o.category).Distinct().ToList(); } BindingList<string> bindingList = new BindingList<string>(list); BindingSource source = new BindingSource(bindingList, null); cmbCategory.DataSource = source; }
DataGridViewRow row; //this will allow to globally update. #endregion Fields #region Constructors public IngredientManager() { InitializeComponent(); ctx = new PWIC_TEST_ONEEntities(); }
private void RawMix_Load(object sender, EventArgs e) { ctx = new PWIC_TEST_ONEEntities(); string strConnectionString = ctx.Database.Connection.ConnectionString; if (strConnectionString.Contains("PWIC_TEST_ONE")) { this.Text = "Raw Mix - Production"; } else { this.Text = "Raw Mix - Test"; } rawMix = new RawMixObject(); listOfIngredientsAndQuantities = new List<RawMixIngredient>(); populateRecipeComboBox(); populateYesNoBoxes(); populateCreamTankNumber(); //setTestingParameters(); isNew = true; //checkForExistingMix(); List<Control> listOfControls = new List<Control>(); enableOrDisableControls(false); }
private void HoldIngredient_Load(object sender, EventArgs e) { this.ctx = new PWIC_TEST_ONEEntities(); dryIngredient = this.getIngredient(); this.populateIngredientLabel(); this.populateLotCode(); this.getHoldOnIngredient(dryIngredient); }
private void setIngredientID() { using (var ctx = new PWIC_TEST_ONEEntities()) { string idToSet = Guid.NewGuid().ToString(); try { if (ctx.Raw_Mix_Ingredient_list.Any(o => o.ingredient_id == idToSet)) { setIngredientID(); } else { ingredient_id = idToSet; } } catch (EntityException entityException) { ErrorLog eLog = new ErrorLog(); eLog.createLogFile(entityException); MessageBox.Show("Could Not Connect to the database. See Log For Details"); } } }
private void populatePoComboBox() { List<string> list; using (var ctx = new PWIC_TEST_ONEEntities()) { list = ctx.remaining_inventory.Where(o => o.lot_code == cmbLotCodes.Text).Select(o => o.purchase_order_number).Distinct().ToList(); } cmbPO.DataSource = list; }
private void IngredientReceivingFormcs_Load(object sender, EventArgs e) { try { ctx = new PWIC_TEST_ONEEntities(); } catch (Exception ex) { Console.Write(ex.StackTrace); } this.populateDryIngredientReceivingTable();//I tab //this.populateIngredientCombobox();//I tab populateCategory(); populateCmbApprovedProduct(); populateCmbQuarantinedProduct(); populatCmbCOAReceived(); populateCmbAllergenTartarzineStickers(); populateCmbStorageLocation(); populateCmbTrailerCondition(); populateCmbSupplier(); }
public RawMixManager() { InitializeComponent(); ctx = new PWIC_TEST_ONEEntities(); }