public AddProductForm(RestClient rClient, ShopForm sForm, Shop shop)
 {
     InitializeComponent();
     this.sForm   = sForm;
     this.rClient = rClient;
     this.shop    = shop;
     #region Putting enums in a list and into the combobox.
     typesList = Enum.GetValues(typeof(ProductType)).Cast <ProductType>().ToList();
     foreach (ProductType pt in typesList)
     {
         cbType.Items.Add(pt);
     }
     #endregion
 }
Example #2
0
        public UpdateItemForm(RestClient rClient, Product product, ShopForm sForm, Shop shop)
        {
            InitializeComponent();

            this.rClient         = rClient;
            this.productToUpdate = product;
            this.sForm           = sForm;
            this.shop            = shop;

            lbUpdateType.Items.Add("FOODS");
            lbUpdateType.Items.Add("DRINKS");
            lbUpdateType.Items.Add("OTHER");
            UpdateInfo(product);
        }