128 lines
4.1 KiB
C#
128 lines
4.1 KiB
C#
// Decompiled with JetBrains decompiler
|
|
// Type: AyABL.TRA.folioBL
|
|
// Assembly: AyABL, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
|
// MVID: 0F2FF6EC-B53C-44DB-9E00-2F932BF80762
|
|
// Assembly location: C:\Users\EQUIPO\Downloads\Raiz\Raiz\bin\AyABL.dll
|
|
|
|
using AyADAL;
|
|
using AyAEL.TRA;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Specialized;
|
|
using System.Configuration;
|
|
using System.Data;
|
|
|
|
namespace AyABL.TRA
|
|
{
|
|
public class folioBL : AyABL
|
|
{
|
|
private static NameValueCollection appSettings = ConfigurationManager.AppSettings;
|
|
|
|
public folioBL()
|
|
{
|
|
this.objfolioEL = new folioEL();
|
|
this.NombreTabla = Modulos.t_dis_.ToString() + Tablas.folio.ToString();
|
|
this.NombreConeccionBD = BASESDEDATOS.SIGDD.ToString();
|
|
}
|
|
|
|
public folioEL objfolioEL { get; set; }
|
|
|
|
public int insertarfolio()
|
|
{
|
|
try
|
|
{
|
|
this.CamposTabla = t_dis_folio.NUMERO.ToString() + Tablas.folio.ToString() + "," + t_dis_folio.FECHA.ToString() + Tablas.folio.ToString() + "," + t_dis_folio.ASTATE.ToString() + Tablas.folio.ToString();
|
|
this.ValoresCampos = new object[3]
|
|
{
|
|
(object) this.objfolioEL.NUMEROFOLIO,
|
|
(object) this.objfolioEL.FECHAFOLIO,
|
|
(object) this.objfolioEL.ASTATE
|
|
};
|
|
return this.baseDAL.Insertar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int modificarfolio()
|
|
{
|
|
try
|
|
{
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
p_arlCondiciones.Add((object) this.buscarPorPK(this.objfolioEL.PK, Tablas.folio, operadorLogico.NONE));
|
|
this.CamposTabla = t_dis_folio.NUMERO.ToString() + Tablas.folio.ToString() + "," + t_dis_folio.FECHA.ToString() + Tablas.folio.ToString() + "," + t_dis_folio.ASTATE.ToString() + Tablas.folio.ToString();
|
|
this.ValoresCampos = new object[3]
|
|
{
|
|
(object) this.objfolioEL.NUMEROFOLIO,
|
|
(object) this.objfolioEL.Fecha,
|
|
(object) this.objfolioEL.ASTATE
|
|
};
|
|
return this.baseDAL.Actualizar(this.NombreTabla, this.CamposTabla, this.ValoresCampos, this.NombreConeccionBD, p_arlCondiciones);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public int eliminarfolio()
|
|
{
|
|
try
|
|
{
|
|
return this.baseDAL.eliminarFisico(this.NombreTabla, this.NombreConeccionBD, new ArrayList()
|
|
{
|
|
(object) this.buscarPorPK(this.objfolioEL.PK, Tablas.folio, operadorLogico.NONE)
|
|
});
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
public DataSet dsListaFoliosSolicitud()
|
|
{
|
|
try
|
|
{
|
|
ArrayList p_arlCondiciones = new ArrayList();
|
|
if (this.objfolioEL.NUMEROFOLIO != string.Empty && this.objfolioEL.NUMEROFOLIO != null)
|
|
p_arlCondiciones.Add((object) this.buscarPorNUMFOLIO(this.objfolioEL.NUMEROFOLIO, Tablas.folio, operadorLogico.NONE));
|
|
return this.baseDAL.EjecutarConsulta(this.NombreTabla, this.CamposTabla, this.NombreConeccionBD, p_arlCondiciones, (string) null, (string) null);
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
protected CondicionDAL buscarPorPK(
|
|
int p_strfolio,
|
|
Tablas p_nombreTabla,
|
|
operadorLogico logOp)
|
|
{
|
|
return new CondicionDAL()
|
|
{
|
|
valorIzquierdo = t_dis_folio.NUMERO.ToString() + p_nombreTabla.ToString(),
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
operadorLogico = logOp,
|
|
valorDerecho = (object) p_strfolio
|
|
};
|
|
}
|
|
|
|
protected CondicionDAL buscarPorNUMFOLIO(
|
|
string p_strfolio,
|
|
Tablas p_nombreTabla,
|
|
operadorLogico logOp)
|
|
{
|
|
return new CondicionDAL()
|
|
{
|
|
valorIzquierdo = t_dis_folio.NUMERO.ToString() + p_nombreTabla.ToString(),
|
|
operadorGeneral = operadorGeneral.EQUAL,
|
|
operadorLogico = logOp,
|
|
valorDerecho = (object) p_strfolio
|
|
};
|
|
}
|
|
}
|
|
}
|