public Boolean AnularDB(cp_codigo_SRI_Info info) { try { cp_codigo_SRI_Data data = new cp_codigo_SRI_Data(); return(data.AnularDB(info)); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "AnularDB", ex.Message), ex) { EntityType = typeof(cp_codigo_SRI_Bus) }; } }
public List <cp_codigo_SRI_Info> Get_List_codigo_SRI(string cod_tipo) { try { cp_codigo_SRI_Data tp_data_ = new cp_codigo_SRI_Data(); return(tp_data_.Get_List_codigo_SRI(cod_tipo)); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "Get_List_codigo_SRI", ex.Message), ex) { EntityType = typeof(cp_codigo_SRI_Bus) }; } }
public Boolean ModificarDB(List <cp_codigo_SRI_x_CtaCble_Info> lista, int codigoSRI) { try { cp_codigo_SRI_Data data = new cp_codigo_SRI_Data(); return(data.ModificarDB(lista, codigoSRI)); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "ModificarDB", ex.Message), ex) { EntityType = typeof(cp_codigo_SRI_Bus) }; } }
public List <cp_TipoDocumento_Info> get_list(int IdEmpresa, decimal IdProveddor, string codigoSRI) { try { /*if (codigoSRI.Length > 2) * return new List<cp_TipoDocumento_Info>();*/ odata = new cp_TipoDocumento_Data(); cp_codigo_SRI_Data data_codigo = new cp_codigo_SRI_Data(); var lst_data = data_codigo.get_info(Convert.ToInt32(codigoSRI)); cp_proveedor_Info info_proveedor = new cp_proveedor_Info(); if (lst_data != null) { codigoSRI = lst_data.codigoSRI; } info_proveedor = bus_proveedor.get_info(IdEmpresa, IdProveddor); List <cp_TipoDocumento_Info> lista = new List <cp_TipoDocumento_Info>(); List <cp_TipoDocumento_Info> lista_retorna = new List <cp_TipoDocumento_Info>(); lista = odata.get_list(false); foreach (var item in lista) { if (item.CodSRI == "03") { item.CodSRI = item.CodSRI; } if (item.Sustento_Tributario != null) { string[] arreglo = item.Sustento_Tributario.Split(','); for (int i = 0; i < arreglo.Length; i++) { arreglo[i] = arreglo[i].Trim(); if (arreglo[i] == codigoSRI) { string secuencial = ""; if (info_proveedor.info_persona.IdTipoDocumento.Trim() == "RUC") { secuencial = "01"; } else if (info_proveedor.info_persona.IdTipoDocumento.Trim() == "CED") { secuencial = "02"; } else { secuencial = "03"; } string[] arregloSecuenci = item.Codigo_Secuenciales_Transaccion.Split(','); for (int ise = 0; ise < arregloSecuenci.Length; ise++) { arregloSecuenci[ise] = arregloSecuenci[ise].Trim(); if (arregloSecuenci[ise] == secuencial) { lista_retorna.Add(item); ise = arregloSecuenci.Length; i = arreglo.Length; } } } } } } return(lista_retorna); } catch (Exception) { throw; } }