Esempio n. 1
0
        public void UpdateLookupCategory(LookupCategoryDTO lookupCategoriesDTO)
        {
            var objLookupCategory = Entities.LookupCategories.Where(x => x.LookupCategoryId == lookupCategoriesDTO.LookupCategoryId).First();

            objLookupCategory.CategoryName = lookupCategoriesDTO.CategoryName;
            objLookupCategory.ModifedDate  = DateTime.Now;

            Entities.Entry(objLookupCategory).State = EntityState.Modified;

            Entities.SaveChanges();
        }
Esempio n. 2
0
        public void AddNewLookupCategory(LookupCategoryDTO lookupCategoryDTO)
        {
            lookupCategoryDTO.ModifedDate = lookupCategoryDTO.CreatedDate;

            var lookupCategory = Mapper.Map <LookupCategoryDTO, LookupCategory>(lookupCategoryDTO);

            Entities.LookupCategories.Add(lookupCategory);

            Entities.Entry(lookupCategory).State = EntityState.Added;

            Entities.SaveChanges();
        }
Esempio n. 3
0
 public void UpdateLookupCategory(LookupCategoryDTO lookupCategoryDTO)
 {
     LookupCategoryManager.UpdateLookupCategory(lookupCategoryDTO);
 }
Esempio n. 4
0
 public void AddNewLookupCategory(LookupCategoryDTO lookupCategoriesDTO)
 {
     LookupCategoryManager.AddNewLookupCategory(lookupCategoriesDTO);
 }