Example #1
0
        private void LoadGridData()
        {
            try
            {
                m_proGrpBo = (BOProductGroup)BOFactory.GetBO(BOIDEnum.ProductGroup);
                IList list = m_proGrpBo.GetDataList();
                List<ProductGroupMD> listObj = Utilities.ConvertList<ProductGroupMD>(list);

                //ProductGroupMD newBo = new ProductGroupMD();
                //newBo.ID = BusinessObject.GetBONextID(BOIDEnum.ProductGroup);
                //listObj.Add(newBo);
                objList.SetObjects(listObj);
                objList.DataSourceType = typeof(ProductGroupMD);
                ProductGroupMD newObj = (ProductGroupMD)objList.AddEmptyRow();
                newObj.ID = BusinessObject.GetBONextID(BOIDEnum.ProductGroup);
            }
            catch (Exception e)
            {
                MessageBox.Show(e.ToString());
            }
        }