Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 21 additions & 36 deletions Business/Etiqueta.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ public class Etiqueta
private Image headerImage = null;

int count = 1;

private float margenDerecho = 0;
int maxChar = 35;
int maxCharDescription = 20;

int imageHeight = 0;

float leftMargin = 2;//2;///estaba en 20--Cambio para plottier
float leftMargin = 2;//2;///estaba en 20--Cambio para centenario=20, para los demas es 2
float leftMarginSdaEtiqueta = 61;
float topMargin = 1; //estaba en 2

Expand Down Expand Up @@ -129,11 +129,11 @@ public void AddCodigoBarras(string line, string fuenteBarCode)
// items.Add(newItem.GenerateItem(cantidad, item, price));
//}

public void AddTotal(string name, string price)
{
OrderTotal newTotal = new OrderTotal('?');
totales.Add(newTotal.GenerateTotal(name, price));
}
//public void AddTotal(string name, string price)
//{
// OrderTotal newTotal = new OrderTotal('?');
// totales.Add(newTotal.GenerateTotal(name, price));
//}

public void AddFooterLine(string line)
{
Expand Down Expand Up @@ -202,8 +202,8 @@ private void pr_PrintPage(object sender, System.Drawing.Printing.PrintPageEventA
{
e.Graphics.PageUnit = GraphicsUnit.Millimeter;
gfx = e.Graphics;

// DrawImage();
gfx.TranslateTransform(margenDerecho, 0);
// DrawImage();
DrawHeader();
DrawSubHeader();
DrawSubHeaderNegrita();
Expand All @@ -219,8 +219,9 @@ private void pr_PrintPage(object sender, System.Drawing.Printing.PrintPageEventA
//}
}

public void PrintTicket2(string equipo, string fuente, string tipoEtiqueta )
public void PrintTicket2(string equipo, string fuente, string tipoEtiqueta ,float margen)
{
margenDerecho = margen;
printFont = new Font(fontName, fontSize, FontStyle.Bold);
printFontPequeño = new Font(fontName, 5, FontStyle.Bold);
//fuenteBarCode ="Code39";
Expand All @@ -238,8 +239,11 @@ public void PrintTicket2(string equipo, string fuente, string tipoEtiqueta )

}



private void DrawSubHeaderNegrita()
{

foreach (string header in subHeaderLinesNegrita)
{
Font printFont_Area= new Font(fontName, 6, FontStyle.Bold);
Expand All @@ -261,6 +265,7 @@ private float YPosition(float topMargin)

private void DrawImage()
{

if (headerImage != null)
{
try
Expand All @@ -277,6 +282,7 @@ private void DrawImage()

private void DrawHeader()
{

foreach (string header in headerLines)
{

Expand Down Expand Up @@ -309,6 +315,7 @@ private void DrawHeader()

private void DrawSubHeader()
{

foreach (string header in subHeaderLines)
{

Expand All @@ -329,6 +336,7 @@ private void DrawSubHeader()

private void DrawCodigoBarras()
{

foreach (string subHeader in subCodigoBarras)
{

Expand All @@ -354,6 +362,7 @@ private void DrawCodigoBarras()

private void DrawFooter()
{

foreach (string footer in footerLines)
{

Expand Down Expand Up @@ -409,6 +418,7 @@ private void DrawFooter()

private void DrawEspacio()
{

line = "";
Font printFontLineaEspacio = new Font(fontName, 1, FontStyle.Regular);
gfx.DrawString(line, printFontLineaEspacio, myBrush, leftMargin, YPosition(1), new StringFormat());
Expand All @@ -420,30 +430,5 @@ private void DrawEspacio()
}


public class OrderTotal
{
char[] delimitador = new char[] { '?' };

public OrderTotal(char delimit)
{
delimitador = new char[] { delimit };
}

public string GetTotalName(string totalItem)
{
string[] delimitado = totalItem.Split(delimitador);
return delimitado[0];
}

public string GetTotalCantidad(string totalItem)
{
string[] delimitado = totalItem.Split(delimitador);
return delimitado[1];
}

public string GenerateTotal(string totalName, string price)
{
return totalName + delimitador[0] + price;
}
}

}
10 changes: 5 additions & 5 deletions Business/Reporte.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ public void AddCodigoBarras(string line, string fuenteBarCode)
// items.Add(newItem.GenerateItem(cantidad, item, price));
//}

public void AddTotal(string name, string price)
{
OrderTotal newTotal = new OrderTotal('?');
totales.Add(newTotal.GenerateTotal(name, price));
}
//public void AddTotal(string name, string price)
//{
// OrderTotal newTotal = new OrderTotal('?');
// totales.Add(newTotal.GenerateTotal(name, price));
//}

public void AddFooterLine(string line)
{
Expand Down
31 changes: 6 additions & 25 deletions ImprimeLocal/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,19 @@
<section name="nhibernate" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<section name="UrlMappings" type="Business.NHibernateHttpModule, Business" />
</configSections>
<nhibernate>
<add key="hibernate.connection.driver_class" value="NHibernate.Driver.SqlClientDriver" />
<add key="hibernate.dialect" value="NHibernate.Dialect.MsSql2000Dialect" />
<add key="hibernate.connection.provider" value="NHibernate.Connection.DriverConnectionProvider" />

<add key="hibernate.connection.connection_string" value="Data Source=DESKTOP-LK7D59V;Initial Catalog=laboSigglNeuquen; Integrated Security=True" />



</nhibernate>
<connectionStrings>
<add connectionString="Data Source=DESKTOP-LK7D59V;Initial Catalog=laboggSilNeuquen; Integrated Security=True" name="CN" />


</connectionStrings>

<appSettings>
<add key="impresora" value="SATO Laboratorio" />
<add key="idEfector" value="70" />
<add key="impresora" value="Microsoft Print to PDF" />
<add key="idEfector" value="216" />
<add key="numeroProtocolo" value="30630" />
<add key="urlAPILaboratorio" value="https://www.saludnqn.gob.ar:7118/" />
<add key="margenDerecho" value="0" />
<add key="urlAPILaboratorio" value="https://www.saludnqn.gob.ar:7118/" />
<add key="tokenAPI" value="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJKV1RTZXJ2aWNlc0FjY2Vzc1Rva2VuIiwianRpIjoiMWQxNzEzOWUtYThjZS00OWNjLThlYjktYjRlODE5MWJjN2QxIiwiaWF0IjoiMy8xMS8yMDI0IDM6NTM6MjcgUE0iLCJ1c3VhcmlvIjoiQURNSU4iLCJleHAiOjIwMjU3MDUyMDcsImlzcyI6Ind3dy5zYWx1ZG5xbi5nb2IuYXIiLCJhdWQiOiJodHRwOi8vbG9jYWxob3N0OjcxMTgvIn0.cARfD5fdg5JGqvfBDjN2dd4yStHE648fSS2Ifw9KeV8" />
<!--<add key="urlAPILaboratorio" value="https://localhost:7118/" />-->

<!--<add key="urlAPILaboratorio" value="https://test.saludnqn.gob.ar:7118/" />
<add key="tokenAPI" value="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJKV1RTZXJ2aWNlc0FjY2Vzc1Rva2VuIiwianRpIjoiMDhmYjY2NjUtZWE3ZC00MzhjLWI4NTktMGU4ODUxN2YyY2MyIiwiaWF0IjoiMy8xMS8yMDI2IDEyOjUwOjA0IFBNIiwidXN1YXJpbyI6ImFkbWluYXBpIiwiZXhwIjoyMDg4ODUyNjA0LCJpc3MiOiJ0ZXN0LnNhbHVkbnFuLmdvYi5hciIsImF1ZCI6Imh0dHA6Ly9sb2NhbGhvc3Q6NzExOC8ifQ.wXJD51QduD_tuyIxk07V5ZuX0roAhuEN2osBMH7hSYM" />-->
<add key="aspnet:MaxHttpCollectionKeys" value="30000" />
<add key="aspnet:MaxJsonDeserializerMembers" value="30000" />
<add key="encKey" value="Laborato" />
<add key="urlLabo" value="http://localhost:17579/" />
<add key="tipoAutenticacion" value="SGH" />
<!--tipoAutenticacion="SSO" -> Aplicable para el Castro Rendon
-tipoAutenticacion="SGH" -> Aplicable para los hospitales con SIPS-->
<add key="urlPaciente" value="../Pacientes/PacienteEdit.aspx?id=0" />
<add key="ClientSettingsProvider.ServiceUri" value="" />
<add key="cantidadLaboratorio" value="1" />
<add key="cantidadMicrobiologia" value="1" />
Expand Down
Loading
Loading