public static void Main(string[] args) { LOT tree = new LOT(); tree.root = new Node(1); tree.root.left = new Node(2); tree.root.right = new Node(3); tree.root.left.left = new Node(4); tree.root.left.right = new Node(5); Console.WriteLine("Level order traversal " + "of binary tree is "); tree.printLevelOrder(); }
private void buttonStore_Click(object sender, EventArgs e) { if (this.pluginBox1.RowItem.Id == (long)0) { return; } StockSelectWrapper stockSelectWrapper = new StockSelectWrapper(); stockSelectWrapper.StockFilter.StoreId = this.pluginBox1.RowItem.Id; if (stockSelectWrapper.Show() == System.Windows.Forms.DialogResult.OK) { StockRecord stockRecord = StockSelectWrapper.GetStockRecord(stockSelectWrapper.GridController.SelectedRow()); InvoiceAutoItem invoiceAutoItem = new InvoiceAutoItem() { Id_goods = stockRecord.IdGoods, Id_party = stockRecord.IdLot }; foreach (InvoiceAutoItem item in this.invoiceAuto.Items) { if (item.Id_goods != invoiceAutoItem.Id_goods || item.Id_party != invoiceAutoItem.Id_party) { continue; } return; } GOODS_BL bL = (GOODS_BL)BLProvider.Instance.GetBL(typeof(GOODS_BL)); invoiceAutoItem.Goods_name = ((GOODS)bL.Load(invoiceAutoItem.Id_goods)).NAME; LOT_BL lOTBL = (LOT_BL)BLProvider.Instance.GetBL(typeof(LOT_BL)); LOT lOT = lOTBL.Load(invoiceAutoItem.Id_party); if (lOT.QUANTITY_REM <= new decimal(0)) { return; } invoiceAutoItem.Store_quantity = lOT.QUANTITY_REM; invoiceAutoItem.Id_scale_ratio = lOT.ID_SCALING_RATIO; SCALING_RATIO_BL sCALINGRATIOBL = (SCALING_RATIO_BL)BLProvider.Instance.GetBL(typeof(SCALING_RATIO_BL)); SCALING_RATIO sCALINGRATIO = (SCALING_RATIO)sCALINGRATIOBL.Load(invoiceAutoItem.Id_scale_ratio); invoiceAutoItem.Scale_ratio_name = string.Concat(sCALINGRATIO.SCALING_RATIO_TEXT, ' ', sCALINGRATIO.UNIT_NAME); this.plInvoice.SetId((long)0); this.invoiceAuto.Items.Add(invoiceAutoItem); this.TransformData(); this.grdItems.BindingSource.CurrencyManager.Refresh(); } }
//--------------------------------------------------------------------------- private void menuConfirm_Click(object sender, RoutedEventArgs e) { if (MessageBox.Show($"{tb_SelectedRecipe.Text}을 Setting 하시겠습니까?", "Recipe Setting", MessageBoxButton.OKCancel) == MessageBoxResult.OK) { lb_CurrentRecipe.Text = tb_SelectedRecipe.Text; FM._sRecipeName = tb_SelectedRecipe.Text; g_VisionManager._RecipeModel.CopyTo(g_VisionManager.CurrentRecipe); g_VisionManager._RecipeVision.CurrentRecipeName = g_VisionManager.CurrentRecipe.strRecipeName; g_VisionManager._RecipeManager.fn_WriteVisionRecipe(); LOT.fn_LotOpen(FM._sRecipeName); //JUNG/200814 fn_WriteLog("[Manual]" + this.Title + " : Confirm Recipe. " + tb_SelectedRecipe.Text, UserEnum.EN_LOG_TYPE.ltTrace); MessageBox.Show($"{tb_SelectedRecipe.Text} Recipe Setting 성공."); } else { MessageBox.Show("취소되었습니다."); } }