public string UpdatePeriodoLocal(BEPeriodoEmpresa periodo) { string respuesta = string.Empty; try { using (DbCommand dbCmd = dbSQL.GetStoredProcCommand("SP_MANT_PERIODO_UPD")) { dbSQL.AddInParameter(dbCmd, "@codLocal", DbType.String, periodo.codLocal); dbSQL.AddInParameter(dbCmd, "@codPeriodo", DbType.String, periodo.codPeriodoEmpresa); using (IDataReader dataReader = dbSQL.ExecuteReader(dbCmd)) { int index0 = dataReader.GetOrdinal("respuesta"); object[] values = new object[dataReader.FieldCount]; while (dataReader.Read()) { dataReader.GetValues(values); respuesta = values[index0] == DBNull.Value ? string.Empty : values[index0].ToString(); } } return(respuesta); } } catch (Exception ex) { ExceptionManager.SaveError("Ocurrio un error al obtener los periodos", string.Empty, string.Empty, ex, "GetPeriodos", true, false); return(null); } finally { } }
public static string UpdPeriodoLocal(BEPeriodoEmpresa obj) { IPeriodos IService = new IPeriodos(); obj.codLocal = obj.codLocal; obj.codPeriodoEmpresa = obj.codPeriodoEmpresa; return(IService.IUpdatePeriodoLocal(obj)); }
public List <BEPeriodoEmpresa> GetPeriodosEmpresa(BEUser users) { try { List <BEPeriodoEmpresa> lstPeriodosEmpresa = new List <BEPeriodoEmpresa>(); BEPeriodoEmpresa bePeriodo = new BEPeriodoEmpresa(); using (DbCommand dbCmd = dbSQL.GetStoredProcCommand("SP_GET_PERIODO")) { dbSQL.AddInParameter(dbCmd, "@codUser", DbType.String, users.UserCod); using (IDataReader dataReader = dbSQL.ExecuteReader(dbCmd)) { int index1 = dataReader.GetOrdinal("DESCPERIODO"); int index2 = dataReader.GetOrdinal("codPeriodoEmpresa"); int index3 = dataReader.GetOrdinal("CODLOCAL"); object[] values = new object[dataReader.FieldCount]; while (dataReader.Read()) { dataReader.GetValues(values); bePeriodo = new BEPeriodoEmpresa(); bePeriodo.descPeriodo = values[index1] == DBNull.Value ? string.Empty : values[index1].ToString(); bePeriodo.codPeriodoEmpresa = values[index2] == DBNull.Value ? string.Empty : values[index2].ToString(); bePeriodo.codLocal = values[index3] == DBNull.Value ? string.Empty : values[index3].ToString(); lstPeriodosEmpresa.Add(bePeriodo); } } return(lstPeriodosEmpresa); } } catch (Exception ex) { ExceptionManager.SaveError("Ocurrio un error al obtener los periodos", string.Empty, string.Empty, ex, "GetPeriodos", true, false); return(null); } finally { } }
public string UpdatePeriodoLocalBL(BEPeriodoEmpresa periodos) { PeriodosDA validatePeriodo = new PeriodosDA(); return(validatePeriodo.UpdatePeriodoLocal(periodos)); }
public string IUpdatePeriodoLocal(BEPeriodoEmpresa periodos) { PeriodosBL updPeriodo = new PeriodosBL(); return updPeriodo.UpdatePeriodoLocalBL(periodos); }