internal static string SELECT(long oid, bool lockTable) { string query = string.Empty; query = SELECT(new QueryConditions { Proforma = BudgetInfo.New(oid) }, lockTable); return(query); }
internal void CopyValues(BudgetInfo source) { if (source == null) { return; } _record.CopyValues(source.Base.Record); _vat_number = source.VatNumber; _id_cliente = source.NumeroCliente; _numero_serie = source.NumeroSerie; _cliente = source.NombreCliente; _codigo_postal = source.CodigoPostal; _usuario = source.Usuario; }
protected virtual void CopyFrom(BudgetInfo source) { if (source == null) { return; } Oid = source.Oid; OidSerie = source.OidSerie; OidCliente = source.OidCliente; Serial = source.Serial; Codigo = source.Codigo; Nota = source.Nota; Observaciones = source.Observaciones; Fecha = source.Fecha; PDescuento = source.PDescuento; PIRPF = source.PIRPF; Subtotal = source.Subtotal; Impuestos = source.Impuestos; Total = source.Total; NumeroSerie = source.NumeroSerie; }
protected void CopyValues(BudgetInfo source, ClienteInfo cliente, SerieInfo serie) { if (source == null) { return; } Oid = source.Oid; _base.CopyValues(source); _base.NumeroSerie = source.NumeroSerie; _base.VatNumber = source.VatNumber; _base.Cliente = source.NombreCliente; _base.IDCliente = source.NumeroCliente; _base.CodigoPostal = source.CodigoPostal; if (cliente != null) { _base.VatNumber = cliente.VatNumber; _base.Cliente = cliente.Nombre; _codigo_cliente = cliente.VatNumber; _direccion = cliente.Direccion; _poblacion = cliente.Poblacion; _provincia = cliente.Provincia; _telefonos = cliente.Telefonos; _fax = cliente.Fax; _municipio = cliente.Municipio; _base.CodigoPostal = source.CodigoPostal; } if (serie != null) { _base.NumeroSerie = serie.Identificador; _nombre_serie = serie.Nombre; } }
/*private static void FormatReport(ProformaRpt rpt, string logo) * { * /*string path = Images.GetRootPath() + "\\" + Resources.Paths.LOGO_EMPRESAS + logo; * * if (File.Exists(path)) * { * Image image = Image.FromFile(path); * int width = rpt.Section1.ReportObjects["Logo"].Width; * int height = rpt.Section1.ReportObjects["Logo"].Height; * * rpt.Section1.ReportObjects["Logo"].Width = 15 * image.Width; * rpt.Section1.ReportObjects["Logo"].Height = 15 * image.Height; * rpt.Section1.ReportObjects["Logo"].Left += (width - 15 * image.Width) / 2; * rpt.Section1.ReportObjects["Logo"].Top += (height - 15 * image.Height) / 2; * } * }*/ #endregion #region Business Methods public ReportClass GetDetailReport(BudgetInfo item, FormatConfFacturaAlbaranReport conf) { if (item == null) { return(null); } List <BudgetPrint> pList = new List <BudgetPrint>(); pList.Add(item.GetPrintObject()); List <BudgetLinePrint> pConceptos = new List <BudgetLinePrint>(); //Si no existen conceptos, no tiene sentido un informe detallado. Además, falla en Crystal Reports if (item.Conceptos.Count <= 0) { return(null); } foreach (BudgetLineInfo concepto in item.Conceptos) { pConceptos.Add(BudgetLinePrint.New(concepto)); } ProductList productos = ProductList.GetList(false); foreach (BudgetLinePrint cfp in pConceptos) { if (cfp.OidProducto == 0) { continue; } ProductInfo prod = productos.GetItem(cfp.OidProducto); if (prod != null) { if (prod.AyudaKilo > 0) { cfp.Concepto += " *"; } } } ReportClass doc = null; try { doc = GetReportFromName("Budget", "BudgetRpt"); } catch { doc = new BudgetRpt(); } doc.SetDataSource(pList); doc.Subreports["ConceptosRpt"].SetDataSource(pConceptos); CompanyInfo empresa = CompanyInfo.Get(Schema.Oid, false); doc.SetParameterValue("nombreEmpresa", empresa.Name); doc.SetParameterValue("dirEmpresa", empresa.Direccion); doc.SetParameterValue("CIFEmpresa", empresa.VatNumber); doc.SetParameterValue("TlfEmpresa", empresa.Telefonos); doc.SetParameterValue("CPEmpresa", empresa.CodPostal); doc.SetParameterValue("municipioEmpresa", empresa.Municipio); doc.SetParameterValue("nota", conf.nota); doc.SetParameterValue("WebEmpresa", empresa.Url); return(doc); }
public static string SELECT(BudgetInfo proforma) { return(SELECT(new QueryConditions { Proforma = proforma })); }