Example #1
0
        public ProductModule()
        {
            this.CurrentModuleName     = "Product";
            CurrentModuleEntity        = new ProductEntities();
            CurrentModuleEntity.Module = this;
            InitializeModule();


            WoodTypeLookupEditControl = (VinaLookupEdit)Controls[WoodTypeLookupEditName];
            WoodTypeLookupEditControl.Properties.DataSource = GetProductAttributesByGroup(ProductAttributeGroup.WoodType);

            ColorLookupEditControl = (VinaLookupEdit)Controls[ColorLookupEditName];
            ColorLookupEditControl.Properties.DataSource = GetProductAttributesByGroup(ProductAttributeGroup.Color);

            ProductGroupLookupEditControl = (VinaLookupEdit)Controls[ProductGroupLookupEditName];

            WoodTypeCheckedComboBoxControl = (CheckedComboBoxEdit)Controls[WoodTypeCheckedComboBoxControlName];
            WoodTypeCheckedComboBoxControl.Properties.DataSource    = GetProductAttributesByGroup(ProductAttributeGroup.WoodType);
            WoodTypeCheckedComboBoxControl.Properties.DisplayMember = "ICProductAttributeName";
            WoodTypeCheckedComboBoxControl.Properties.ValueMember   = "ICProductAttributeID";

            ColorCheckedComboBoxControl = (CheckedComboBoxEdit)Controls[ColorCheckedComboBoxControlName];
            ColorCheckedComboBoxControl.Properties.DataSource    = GetProductAttributesByGroup(ProductAttributeGroup.Color);
            ColorCheckedComboBoxControl.Properties.DisplayMember = "ICProductAttributeName";
            ColorCheckedComboBoxControl.Properties.ValueMember   = "ICProductAttributeID";
        }
Example #2
0
        public override void InitGridControlDataSource()
        {
            ProductEntities entity = (ProductEntities)((BaseModuleERP)Screen.Module).CurrentModuleEntity;
            BindingSource   bds    = new BindingSource();

            bds.DataSource  = entity.ProductMeasureUnitList;
            this.DataSource = bds;
        }
Example #3
0
        public List <ICProductGroupsInfo> GetProductGroupByDepartmentForDataSource()
        {
            ProductEntities           entity                     = (ProductEntities)CurrentModuleEntity;
            ICProductsInfo            objProductsInfo            = (ICProductsInfo)entity.MainObject;
            ICProductGroupsController objProductGroupsController = new ICProductGroupsController();

            return(objProductGroupsController.GetProductGroupByDepartmentID(objProductsInfo.FK_ICDepartmentID));
        }
Example #4
0
        public void SetProductExtraWoodTypeAndColor()
        {
            ProductEntities entity          = (ProductEntities)CurrentModuleEntity;
            ICProductsInfo  objProductsInfo = (ICProductsInfo)entity.MainObject;

            if (objProductsInfo != null)
            {
                if (WoodTypeCheckedComboBoxControl.EditValue != null)
                {
                    string woodTypes = WoodTypeCheckedComboBoxControl.EditValue.ToString();
                    objProductsInfo.ICProductAttributeWoodType = woodTypes;
                }

                if (ColorCheckedComboBoxControl.EditValue != null)
                {
                    string colors = ColorCheckedComboBoxControl.EditValue.ToString();
                    objProductsInfo.ICProductAttributeColor = colors;
                }
            }
        }