Exemplo n.º 1
0
        private void ButtonAddIngredientGroup_Click(object sender, RoutedEventArgs e)
        {
            FabricColor         selectedFabricColor = ComboBoxFabricColor.SelectedItem as FabricColor;
            IngredientGroupInfo ingredientGroupInfo = FabricModule.GetIngredientGroupInfo(selectedFabricColor.FabricID, selectedFabricColor.ColorNo);
            List <FabricIngredientProportion> fabricIngredientProportion = (DataGridFabricIngredientProportion.ItemsSource as IEnumerable <FabricIngredientProportion>).ToList();

            fabricIngredientProportion.ForEach(f => f.Group = ingredientGroupInfo.Group + 1);
            bool success = FabricModule.InsertFabricIngredientProportions(ingredientGroupInfo.ColorNo, fabricIngredientProportion);

            success.CheckSuccessMessageBox("新增成功!!", "好像有錯誤喔!!");
        }
Exemplo n.º 2
0
        /// <summary>
        /// 取得布種的成分群組資訊
        /// </summary>
        /// <param name="fabricID"></param>
        /// <param name="fabricColorNo"></param>
        /// <returns></returns>
        public IngredientGroupInfo GetIngredientGroupInfo(int fabricID, int fabricColorNo)
        {
            IngredientGroupInfo ingredientGroupInfo = FabricAdapter.GetIngredientGroupInfo(fabricID, fabricColorNo);

            return(ingredientGroupInfo);
        }