Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
 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");
     }
 }
Ejemplo n.º 3
0
 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);
     }
 }
Ejemplo n.º 4
0
 private void RecipeManager_Load(object sender, EventArgs e)
 {
     ctx = new PWIC_TEST_ONEEntities();
     populateRecipeName();
 }
Ejemplo n.º 5
0
 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;
 }
Ejemplo n.º 6
0
        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;
        }
Ejemplo n.º 7
0
        DataGridViewRow row; //this will allow to globally update.

        #endregion Fields

        #region Constructors

        public IngredientManager()
        {
            InitializeComponent();
            ctx = new PWIC_TEST_ONEEntities();
        }
Ejemplo n.º 8
0
        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);
        }
Ejemplo n.º 9
0
 private void HoldIngredient_Load(object sender, EventArgs e)
 {
     this.ctx = new PWIC_TEST_ONEEntities();
     dryIngredient = this.getIngredient();
     this.populateIngredientLabel();
     this.populateLotCode();
     this.getHoldOnIngredient(dryIngredient);
 }
Ejemplo n.º 10
0
 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");
         }
     }
 }
Ejemplo n.º 11
0
 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;
 }
Ejemplo n.º 12
0
        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();
        }
Ejemplo n.º 13
0
 public RawMixManager()
 {
     InitializeComponent();
     ctx = new PWIC_TEST_ONEEntities();
 }