protected override void EditWorkReportAction() { if (WorkReport_DGW.CurrentRow == null) { return; } if (WorkReport_DGW.CurrentRow.Index < 0) { return; } if (WorkReport_DGW.CurrentRow.DataBoundItem == null) { return; } WorkReportInfo item = (WorkReportInfo)WorkReport_DGW.CurrentRow.DataBoundItem; WorkReportEditForm form = new WorkReportEditForm(item.Oid, this); form.ShowDialog(this); item.CopyFrom(form.Entity); WorkReport_BS.ResetBindings(false); UpdateWorkReportsTotals(); LoadCategoriesExpenses(true); }
protected override void EditWorkReportAction() { if (!ControlsMng.IsCurrentItemValid(WorkReport_DGW)) { return; } WorkReportResourceInfo item = ControlsMng.GetCurrentItem(WorkReport_DGW) as WorkReportResourceInfo; WorkReportEditForm form = new WorkReportEditForm(item.OidWorkReport, this); form.ShowDialog(this); if (form.ActionResult == DialogResult.OK) { LoadWorkReports(true); } }
public override void OpenEditForm() { if (ActiveItem.EStatus == moleQule.Base.EEstado.Closed) { PgMng.ShowInfoException("No es posible modificar un parte de trabajo cerrado."); _action_result = DialogResult.Ignore; return; } WorkReportEditForm form = new WorkReportEditForm(ActiveOID, this); if (form.Entity != null) { AddForm(form); _entity = form.Entity; } }