public static void OpenEditFormAction(ETipoAcreedor providerType, long oid, Form parent) { switch (providerType) { case ETipoAcreedor.Acreedor: case ETipoAcreedor.Proveedor: { ProveedorEditForm form = new ProveedorEditForm(oid, providerType, parent); form.ShowDialog(parent); } break; case ETipoAcreedor.Naviera: { NavieraEditForm form = new NavieraEditForm(oid, parent); form.ShowDialog(parent); } break; case ETipoAcreedor.Despachante: { DespachanteEditForm form = new DespachanteEditForm(oid, parent); form.ShowDialog(parent); } break; case ETipoAcreedor.TransportistaOrigen: case ETipoAcreedor.TransportistaDestino: { TransporterEditForm form = new TransporterEditForm(oid, providerType, parent); form.ShowDialog(parent); } break; } }
public override void OpenEditForm() { TransporterEditForm form = new TransporterEditForm(ActiveOID, ActiveItem.ETipoAcreedor, this); if (form.Entity != null) { AddForm(form); _entity = form.Entity; } }
protected void EditProveedorAction() { switch (Entity.ETipoAcreedor) { case ETipoAcreedor.Acreedor: case ETipoAcreedor.Proveedor: { ProveedorEditForm form = new ProveedorEditForm(Entity, this); form.ShowDialog(); } break; case ETipoAcreedor.Despachante: { DespachanteEditForm form = new DespachanteEditForm(Entity, this); form.ShowDialog(); } break; case ETipoAcreedor.Naviera: { NavieraEditForm form = new NavieraEditForm(Entity, this); form.ShowDialog(); } break; case ETipoAcreedor.TransportistaDestino: case ETipoAcreedor.TransportistaOrigen: { TransporterEditForm form = new TransporterEditForm(Entity, this); form.ShowDialog(); } break; } _summary.Refresh(Entity); Datos_Resumen.DataSource = _summary; Datos_Resumen.ResetBindings(false); }
public override void OpenEditForm() { switch (ActiveItem.ETipoAcreedor) { case ETipoAcreedor.Acreedor: case ETipoAcreedor.Proveedor: { ProveedorEditForm form = new ProveedorEditForm(ActiveItem.OidAcreedor, ActiveItem.ETipoAcreedor, this); if (form.Entity != null) { AddForm(form); if (form.ActionResult == DialogResult.OK) { _entity = new ProviderBase(); _entity.CopyValues(form.Entity.ProviderBase); _entity.Record.CopyValues(form.Entity.Base.Record); } } } break; case ETipoAcreedor.Despachante: { DespachanteEditForm form = new DespachanteEditForm(ActiveItem.OidAcreedor, this); if (form.Entity != null) { AddForm(form); if (form.ActionResult == DialogResult.OK) { _entity = new ProviderBase(); _entity.CopyValues(form.Entity.ProviderBase); _entity.Record.CopyValues(form.Entity.Base.Record); } } } break; case ETipoAcreedor.Naviera: { NavieraEditForm form = new NavieraEditForm(ActiveItem.OidAcreedor, this); if (form.Entity != null) { AddForm(form); if (form.ActionResult == DialogResult.OK) { _entity = new ProviderBase(); _entity.CopyValues(form.Entity.ProviderBase); _entity.Record.CopyValues(form.Entity.Base.Record); } } } break; case ETipoAcreedor.TransportistaOrigen: case ETipoAcreedor.TransportistaDestino: { TransporterEditForm form = new TransporterEditForm(ActiveItem.OidAcreedor, ActiveItem.ETipoAcreedor, this); if (form.Entity != null) { AddForm(form); if (form.ActionResult == DialogResult.OK) { _entity = new ProviderBase(); _entity.CopyValues(form.Entity.ProviderBase); _entity.Record.CopyValues(form.Entity.Base.Record); } } } break; } }