示例#1
0
    private void InitilizeAttribute(Constants.Master enumMaster)
    {
        try
        {
            switch (enumMaster)
            {
            case Constants.Master.Category:
                _categoryView = (ICategoryView)_view;
                _modelCat     = new ModelCategory();
                break;

            case Constants.Master.SubCategory:
                _masterListEntry = (ISubCategoryView)_view;
                _modelSubCat     = new ModelSubCategory();
                break;

            default:
                break;
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
示例#2
0
    /// <summary>
    /// Get All SubCategory Based On selection
    /// </summary>
    /// <param name="catID"></param>
    /// <returns></returns>
    public static List <KeyValuePair <int, string> > BindSubCategory(int categoryID)
    {
        ModelSubCategory _subCategory = new ModelSubCategory();

        return(_subCategory.GetSubCategoriesList(categoryID));
    }
 public SubCategoryListPresenter(IMasterSubCategoryListView view)
 {
     _view  = view;
     _model = new ModelSubCategory();
     SubscribeViewToEvents();
 }