protected bool Equals(ProductType entity) { if (entity == null) return false; if (!base.Equals(entity)) return false; return true; }
protected override void OnInitialize() { ProductTypeList = new ArrayList(); CategoryList = new ArrayList(); ProductMasterPriceList = new List<MainPrice>(); IList typeList = (IList)Flow.Session.Get(FlowConstants.PRODUCT_TYPE_LIST); IList catList = (IList)Flow.Session.Get(FlowConstants.CATEGORY_LIST); ProductType allProductType = new ProductType { TypeId = 0, TypeName = "---- TẤT CẢ CHỦNG LOẠI ----" }; Category allCategory = new Category { CategoryId = 0, CategoryName = "---- TẤT CẢ NHÓM ----" }; if (typeList.Count > 0) { IList preparedTypeList = new ArrayList(); preparedTypeList.Add(allProductType); foreach (var type in typeList) { preparedTypeList.Add(type); } ProductTypeList = preparedTypeList; } if (catList.Count > 0) { IList preparedCatList = new ArrayList(); preparedCatList.Add(allCategory); foreach (var type in catList) { preparedCatList.Add(type); } CategoryList = preparedCatList; } _allMainPriceList = (IList<MainPrice>)Flow.Session.Get(FlowConstants.MAINPRICE_LIST); }