internal object GroupsDisplayType(GroupsDisplayType grf) { //Check Duplicate For Sub Category if (grf.FKSubCategory_Id.HasValue) { if (db.GroupsDisplayTypes.Any(c => c.FKGroup_Id == grf.FKGroup_Id && c.FKSubCategory_Id == grf.FKSubCategory_Id)) { var Dupl = db.GroupsDisplayTypes.Where(c => c.FKGroup_Id == grf.FKGroup_Id && c.FKSubCategory_Id == grf.FKSubCategory_Id).Single(); return(new { RequestType = RequestTypeEnumVM.Error, Message = Token.CanNotDuplicateRow + " : " + Dupl.Group.GroupName + " " + Token.With + " : " + Dupl.SubCategory.SubCategoryName, Title = Token.Warning }); } } else { //Check Dublicate For Category if (db.GroupsDisplayTypes.Any(c => c.FKGroup_Id == grf.FKGroup_Id && c.FKCategory_Id == grf.FKCategory_Id && c.FKCategory_Id == grf.FKCategory_Id)) { var Dupl = db.GroupsDisplayTypes.Where(c => c.FKGroup_Id == grf.FKGroup_Id && c.FKCategory_Id == grf.FKCategory_Id && c.FKCategory_Id == grf.FKCategory_Id).Single(); return(new { RequestType = RequestTypeEnumVM.Error, Message = Token.CanNotDuplicateRow + " : " + Dupl.Group.GroupName + " " + Token.With + " : " + Dupl.Category.CategoryName, Title = Token.Warning }); } } var Category = db.Categories.Find(grf.FKCategory_Id); var GroupsItems = db.GroupsItems.Find(grf.FKGroup_Id); db.GroupsDisplayTypes.Add(grf); return(null); }
internal object GroupsDisplayType(GroupsDisplayType groupsFieldsDisplayType) { var GroupsDisplayTypeRemove = db.GroupsDisplayTypes.Find(groupsFieldsDisplayType.Id); //Delete db.GroupsDisplayTypes.Remove(GroupsDisplayTypeRemove); return(null); }
internal object GroupsDisplayType(object rentalCategory, GroupsDisplayType groupsFieldsDisplayType) { throw new NotImplementedException(); }
internal object GroupsDisplayType(GroupsDisplayType groupsFieldsDisplayType) { throw new NotImplementedException(); }