コード例 #1
0
        private void addProductButton_Click(object sender, EventArgs e)
        {
            ProductForm productForm = new ProductForm();

            this.Hide();
            productForm.ShowDialog();
        }
コード例 #2
0
        private void addStripMenuItem1_Click(object sender, EventArgs e)
        {
            ProductForm productForm = new ProductForm();

            this.Hide();
            productForm.ShowDialog();
            UpdateProducts();
        }
コード例 #3
0
        //Buttons (add/edit or delete)
        private void btnAddProduct_Click(object sender, EventArgs e)
        {
            disableButtons();
            Product     product    = new Product();
            ProductForm addProduct = new ProductForm(product);

            addProduct.Show();
        }
コード例 #4
0
 private void btnEditProduct_Click(object sender, EventArgs e)
 {
     if (LV_products.SelectedItems.Count > 0)
     {
         //uses selected value to find in the DB and passes it through in the next form
         var         ProductID       = LV_products.SelectedItems[0].Tag;
         Product     selectedProduct = Program.db.Products.Find(ProductID);
         ProductForm editProduct     = new ProductForm(selectedProduct);
         disableButtons();
         editProduct.Show();
     }
 }
コード例 #5
0
ファイル: AdminPanel.cs プロジェクト: IrisaW/mine
        public AdminPanel()
        {
            InitializeComponent();
            DateTime localDate = DateTime.Now;

            String[] cultureNames = { "ru-RU" };

            foreach (var cultureName in cultureNames)
            {
                var culture = new CultureInfo(cultureName);
                label_data.Text = localDate.ToString(culture);
            }


            db = new SilpoDBEntities();
            ProductForm pf = new ProductForm(db);

            var skinmanager = MaterialSkinManager.Instance;

            skinmanager.AddFormToManage(this);
            skinmanager.Theme       = MaterialSkinManager.Themes.DARK;
            skinmanager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE);
        }
コード例 #6
0
ファイル: AdminPanel.cs プロジェクト: IrisaW/mine
        private void but_product_Click(object sender, EventArgs e)
        {
            ProductForm product = new ProductForm(db);

            product.ShowDialog();
        }