public void InsertPermissionTest()
        {
            OralConsultationPermissionService obj  = new OralConsultationPermissionService(new StoreContext());
            OralConsultationPermissionItem    item = new OralConsultationPermissionItem
            {
                OralConsultationPermissionID = 0,
                OralConsultationID           = null,
                UserID   = "4B14DB66-29E2-4373-B88A-0B9677728611",
                IsRead   = true,
                IsChange = true,
                GUID     = new Guid("4B14DB66-29E2-4373-B88A-0B9677728611")
            };
            OralConsultationPermissionItem result = obj.InsertPermission(item);

            Assert.AreNotEqual(null, result);
        }
Exemplo n.º 2
0
 public ActionResult OralConsultationPermissionDelete([DataSourceRequest] DataSourceRequest request, OralConsultationPermissionItem oralConsultationPermissionItem)
 {
     if (oralConsultationPermissionItem != null)
     {
         oralConsultationPermissionItem = service.DeletePermission(oralConsultationPermissionItem);
     }
     return(Json(new[] { oralConsultationPermissionItem }.ToDataSourceResult(request, ModelState)));
 }
Exemplo n.º 3
0
 public ActionResult OralConsultationPermissionCreate([DataSourceRequest] DataSourceRequest request, OralConsultationPermissionItem oralConsultationPermissionItem, string prmGUID)
 {
     if (oralConsultationPermissionItem != null && ModelState.IsValid)
     {
         oralConsultationPermissionItem.GUID = new Guid(prmGUID);
         oralConsultationPermissionItem      = service.InsertPermission(oralConsultationPermissionItem);
     }
     return(Json(new[] { oralConsultationPermissionItem }.ToDataSourceResult(request, ModelState)));
 }