public override void PrintObject() { PgMng.Reset(5, 1, Face.Resources.Messages.LOADING_DATA, this); OutputDeliveryReportMng reportMng = new OutputDeliveryReportMng(AppContext.ActiveSchema); OutputDeliveryInfo item = OutputDeliveryInfo.Get(EntityInfo.Oid, ETipoEntidad.WorkReport, true); PgMng.Grow(); WorkReportInfo work_report = WorkReportInfo.Get(item.OidHolder, false); PgMng.Grow(); ExpedientInfo work = ExpedientInfo.Get((work_report != null) ? work_report.OidExpedient : 0, false); PgMng.Grow(); ReportClass report = reportMng.GetWorkDelivery(item, work); PgMng.FillUp(); if (SettingsMng.Instance.GetUseDefaultPrinter()) { int n_copias = SettingsMng.Instance.GetDefaultNCopies(); PrintReport(report, n_copias); } else { ShowReport(report); } }
public InvoiceAddForm(ClienteInfo client, OutputDeliveryInfo delivery, Form parent) : this(parent) { SetClient(client); SetSerie(SerieInfo.Get(delivery.OidSerie, false), true); _entity.AlbaranContado = delivery.Contado; _entity.Rectificativa = delivery.Rectificativo; _out_delivery = delivery; }
public void OpenAddForm(OutputDeliveryInfo albaran) { TicketAddForm form = new TicketAddForm(albaran, this); AddForm(form); if (form.ActionResult == DialogResult.OK) { _entity = form.Entity; } }
public void OpenAddForm(ClienteInfo cliente, OutputDeliveryInfo delivery) { InvoiceAddForm form = new InvoiceAddForm(cliente, delivery, this); AddForm(form); if (form.ActionResult == DialogResult.OK) { _entity = form.Entity; } }
public void SetOutputDeliverySource(OutputDeliveryInfo source) { if (source == null) { return; } SetSourceClient(ClienteInfo.Get(source.OidHolder, false)); _out_deliveries.Clear(); _out_deliveries.Add(source); SetSourceDeliveries(_out_deliveries); }
protected override void SetRowFormat(DataGridViewRow row) { if (row.IsNewRow) { return; } if (!row.Displayed) { return; } OutputDeliveryInfo item = row.DataBoundItem as OutputDeliveryInfo; Face.Common.ControlTools.Instance.SetRowColor(row, item.EEstado); }
private bool AddAlbaran(OutputDeliveryInfo albaran) { List <OutputDeliveryInfo> list = new List <OutputDeliveryInfo>(); list.Add(albaran); _results = list; DoAddAlbaran(null); if (Result == BGResult.OK) { Serie_BT.Enabled = false; Datos.ResetBindings(false); } return(false); }
public override void PrintDetailAction() { if (ActiveItem == null) { return; } PgMng.Reset(6, 1, Face.Resources.Messages.LOADING_DATA, this); OutputDeliveryReportMng reportMng = new OutputDeliveryReportMng(AppContext.ActiveSchema, this.Text, this.FilterValues); SerieInfo serie = SerieInfo.Get(ActiveItem.OidSerie, false); PgMng.Grow(); ClienteInfo cliente = ClienteInfo.Get(ActiveItem.OidHolder, false); PgMng.Grow(); FormatConfFacturaAlbaranReport conf = new FormatConfFacturaAlbaranReport(); conf.nota = (cliente.OidImpuesto == 1) ? Library.Invoice.Resources.Messages.NOTA_EXENTO_IGIC : string.Empty; conf.nota += Environment.NewLine + (ActiveItem.Nota ? serie.Cabecera : ""); conf.cuenta_bancaria = ActiveItem.CuentaBancaria; PgMng.Grow(); OutputDeliveryInfo item = OutputDeliveryInfo.Get(ActiveOID, ActiveItem.EEntityType, true); PgMng.Grow(); ReportClass report = reportMng.GetDetailReport(item, conf); PgMng.FillUp(); if (SettingsMng.Instance.GetUseDefaultPrinter()) { int n_copias = SettingsMng.Instance.GetDefaultNCopies(); PrintReport(report, n_copias); } else { ShowReport(report); } }
public static WorkReport GetByResource(long oidResource, ETipoEntidad entityType, bool childs = true) { QueryConditions conditions = new QueryConditions(); switch (entityType) { case ETipoEntidad.Empleado: conditions.Acreedor = ProviderBaseInfo.New(oidResource, ETipoAcreedor.Empleado); break; case ETipoEntidad.OutputDelivery: conditions.OutputDelivery = OutputDeliveryInfo.New(oidResource); break; case ETipoEntidad.Tool: conditions.Tool = ToolInfo.New(oidResource); break; } return(Get(SELECT(conditions, true), childs)); }
public override void ExportPDFAction() { if (ActiveItem == null) { return; } try { PgMng.Reset(7, 1, Face.Resources.Messages.RETRIEVING_DATA, this); OutputDeliveryReportMng reportMng = new OutputDeliveryReportMng(AppContext.ActiveSchema, this.Text, this.FilterValues); SerieInfo serie = SerieInfo.Get(ActiveItem.OidSerie, false); PgMng.Grow(); ClienteInfo cliente = ClienteInfo.Get(ActiveItem.OidHolder, false); PgMng.Grow(); FormatConfFacturaAlbaranReport conf = new FormatConfFacturaAlbaranReport(); conf.nota = (cliente.OidImpuesto == 1) ? Library.Invoice.Resources.Messages.NOTA_EXENTO_IGIC : string.Empty; conf.nota += Environment.NewLine + (ActiveItem.Nota ? serie.Cabecera : ""); conf.cuenta_bancaria = ActiveItem.CuentaBancaria; PgMng.Grow(); OutputDeliveryInfo item = OutputDeliveryInfo.Get(ActiveOID, ActiveItem.EHolderType, true); PgMng.Grow(); ReportClass rpt = reportMng.GetDetailReport(item, conf); PgMng.Grow(); ExportPDF(rpt, ActiveItem.FileName); } finally { PgMng.FillUp(); } }
private bool AddAlbaran(OutputDeliveryInfo outDelivery) { List <OutputDeliveryInfo> list = new List <OutputDeliveryInfo>(); list.Add(outDelivery); _results = list; DoAddAlbaran(null); if (Result == BGResult.OK) { Serie_BT.Enabled = false; Datos.ResetBindings(false); } if ((_entity.AlbaranContado) && (_entity.Conceptos.Count < 0)) { Agrupada_CkB.Enabled = false; } return(false); }
public TicketAddForm(OutputDeliveryInfo delivery, Form parent) : this(parent) { SetSerie(SerieInfo.Get(delivery.OidSerie, false), false); _albaran = delivery; }
public CompanyExporterActionForm(Form parent, OutputDeliveryInfo source) : this(parent) { SetOutputDeliverySource(source); }
public override void UpdateList() { switch (_current_action) { case molAction.Add: case molAction.Copy: if (_entity == null) { return; } if (List.GetItem(_entity.Oid) != null) { return; } List.AddItem(_entity.GetInfo(false)); if (FilterType == IFilterType.Filter) { OutputDeliveryList listA = OutputDeliveryList.GetList(_filter_results); listA.AddItem(_entity.GetInfo(false)); _filter_results = listA.GetSortedList(); } break; case molAction.CustomAction1: case molAction.CustomAction2: case molAction.Edit: case molAction.Lock: case molAction.Unlock: if (_selected != null) { List <OutputDeliveryInfo> entities = (List <OutputDeliveryInfo>)_selected; foreach (OutputDeliveryInfo item in entities) { List.GetItem(item.Oid).CopyFrom(item); if (FilterType == IFilterType.Filter) { OutputDeliveryList list = OutputDeliveryList.GetList(_filter_results); OutputDeliveryInfo entity = list.GetItem(item.Oid); if (entity != null) { entity.CopyFrom(item); } _filter_results = list.GetSortedList(); } } } if (_entity == null) { return; } ActiveItem.CopyFrom(_entity); break; case molAction.Delete: if (ActiveItem == null) { return; } List.RemoveItem(ActiveOID); if (FilterType == IFilterType.Filter) { OutputDeliveryList listD = OutputDeliveryList.GetList(_filter_results); listD.RemoveItem(ActiveOID); _filter_results = listD.GetSortedList(); } break; } RefreshSources(); if (_entity != null) { Select(_entity.Oid); } _entity = null; }
protected override void GetFormSourceData(long oid, object[] parameters) { ETipoEntidad holder_type = (ETipoEntidad)parameters[0]; _entity = OutputDeliveryInfo.Get(oid, holder_type, true); }