Exemple #1
0
        void AddTypeToGrid(Backend.Objects.ProductType type)
        {
            //Fill Grid [ BrandsGrid ] With Rows
            ProductTypeModel typeModel = new ProductTypeModel
            {
                OnDelete = OnDeleteType,
                Type     = type,
                User     = user,
            };

            //Add To Grid
            TypesGrid.Controls.Add(typeModel);
        }
Exemple #2
0
        void Initialize()
        {
            user = Util.Data.GetUser();
            type = ProductType;

            //Get Task
            if (Task == Enums.Task.Get || Task == Enums.Task.Update)
            {
                GetProductType();
                lblTitle.Text       = type.Name;
                btnAction.Text      = "Edit" + " Type";
                btnAction.Iconimage = imageEdit;
            }
            else if (Task == Enums.Task.Create)
            {
                type = new Backend.Objects.ProductType();

                lblTitle.Text       = "New Type";
                btnAction.Text      = "Add" + " Type";
                btnAction.Iconimage = imageAdd;
            }

            Translate();
        }