public ActionResult ExternalMethodDeleteRows(Guid[] checkedRecords) { checkedRecords = checkedRecords ?? new Guid[] { }; try { MetaFormHelper.EMDelete(checkedRecords); } catch (NotValidationException ex) { return(Content(MessageHelper.FormedMessageNote(ex.Message), "")); } catch (Exception ex) { return(Content(MessageHelper.FormedMessageWarning(ex), "")); } return(Content(MessageHelper.FormedMessageSuccess(Resources.Resource.RowsDeleted + "!"), "")); }
public ActionResult Edit(Guid?id) { if (id.HasValue) { MetaForm obj = MetaFormHelper.Get(id.Value); if (obj == null) { return(MessageHelper.FormedContentObjectNotFound()); } MetaFormModel.CreateMap(); MetaFormModel model = Mapper.Map <MetaForm, MetaFormModel>(obj); //SetShowImportExportOptions(model); model.ShowImportExportOptions = true; return(View(model)); } else { return(View(new MetaFormModel())); } }
public ActionResult EditExternalMethod(Guid?id, Guid?FormId) { MetaFormExternalMethodModel model = null; if (id.HasValue) { var att = MetaFormHelper.GetExternalMethod(id.Value); if (att == null) { return(MessageHelper.FormedContentObjectNotFound()); } MetaFormExternalMethodModel.CreateMap(); model = Mapper.Map <MetaFormExternalMethod, MetaFormExternalMethodModel>(att); return(View(model)); } else if (FormId.HasValue) { MetaForm item = MetaFormHelper.Get(FormId.Value); if (item != null) { return(View(new MetaFormExternalMethodModel { MetaFormId = item.Id, MetaFormCaption = item.Caption, })); } else { return(MessageHelper.FormedContentObjectNotFound()); } } else { return(MessageHelper.FormedContentObjectNotFound()); } }
protected override void OnRestoreRows(Guid[] checkedRecords) { MetaFormHelper.Restore(checkedRecords); }
protected override void OnRemoveRows(Guid[] checkedRecords) { MetaFormHelper.Delete(checkedRecords, true); }