示例#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);
        }