public void SubmitForm(SysRole roleEntity, string keyValue) { if (!string.IsNullOrEmpty(keyValue)) { roleEntity.Modify(keyValue); service.Update(roleEntity); } else { roleEntity.Create(); roleEntity.FCategory = 2; service.Insert(roleEntity); } }