Пример #1
0
        private CategoryDM Map(CategorySM category)
        {
            CategoryDM video = new CategoryDM();

            video.CtgyId   = category.CtgyId.ToString();
            video.Category = category.Category;
            return(video);
        }
Пример #2
0
        private CategorySM Map(CategoryDM category)
        {
            CategorySM video = new CategorySM();

            video.CtgyId   = Convert.ToInt32(category.CtgyId);
            video.Category = category.Category;
            return(video);
        }
Пример #3
0
 public void EditCategoryById(CategorySM category)
 {
     try
     {
         categoryData.EditCategoryById(Map(category));
         logs.LogError("Event ", "User was able to update Category", "Class:CategoryLogic, Method:UpdateCategoryById");
     }
     catch (Exception e)
     {
         logs.LogError("Error ", "User was unable to update Category", "Class:CategoryLogic, Method:UpdateCategoryById");
     }
 }
Пример #4
0
 public void CreateCategory(CategorySM category)
 {
     try
     {
         categoryData.CreateCategory(Map(category));
         logs.LogError("Event ", "User was able to create new item ", "Class:CategoryLogic, Method:CreateCategory");
     }
     catch (Exception P)
     {
         logs.LogError("Error ", "User was unable to create a new item ", "Class:UserLogic, Method:CreateCategory");
     }
 }
Пример #5
0
        public string GetCategory(int id)
        {
            CategorySM category = Map(categoryData.GetCategoryById(id));

            return(category.Category);
        }