public List <prd_CotizacionCompras_Info> ObtenerListaCotizacion(int IdEmpresa) { try { List <prd_CotizacionCompras_Info> lm = new List <prd_CotizacionCompras_Info>(); EntitiesProduccion_Cidersus OEEtapa = new EntitiesProduccion_Cidersus(); var registros = from A in OEEtapa.prd_Obra where A.IdEmpresa == IdEmpresa orderby A.CodObra select A; foreach (var item in registros) { prd_CotizacionCompras_Info info = new prd_CotizacionCompras_Info(); info.IdEmpresa = item.IdEmpresa; info.Observacion = item.Estado; lm.Add(info); } return(lm); } catch (Exception ex) { string arreglo = ToString(); tb_sis_Log_Error_Vzen_Data oDataLog = new tb_sis_Log_Error_Vzen_Data(); tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now); mensaje = ex.ToString() + " " + ex.Message; oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje); throw new Exception(ex.ToString()); } }
public Boolean GuardarDB(prd_CotizacionCompras_Info info, ref string msg) { try { using (EntitiesCompras Context = new EntitiesCompras()) { var Address = new com_cotizacion_compra(); Address.IdEmpresa = info.IdEmpresa; Address.IdCotizacion = getId(info.IdEmpresa); Address.IdSucursal = info.IdSucursal; Address.Observacion = info.Observacion; Context.com_cotizacion_compra.Add(Address); Context.SaveChanges(); //grbar detalle } msg = "GrabaciĆ³n exitosa.."; return(true); } catch (Exception ex) { string arreglo = ToString(); tb_sis_Log_Error_Vzen_Data oDataLog = new tb_sis_Log_Error_Vzen_Data(); tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now); msg = ex.ToString() + " " + ex.Message; oDataLog.Guardar_Log_Error(Log_Error_sis, ref msg); throw new Exception(ex.ToString()); } }
public Boolean ModificarDB(prd_CotizacionCompras_Info info, ref string msg) { try { using (EntitiesProduccion_Cidersus Context = new EntitiesProduccion_Cidersus()) { var contact = Context.prd_Obra.FirstOrDefault(A => A.IdEmpresa == info.IdEmpresa && A.IdEmpresa == info.IdEmpresa); if (contact != null) { contact.Estado = info.Observacion; Context.SaveChanges(); msg = "GrabaciĆ³n exitosa.."; } } return(true); } catch (Exception ex) { string arreglo = ToString(); tb_sis_Log_Error_Vzen_Data oDataLog = new tb_sis_Log_Error_Vzen_Data(); tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now); msg = ex.ToString() + " " + ex.Message; oDataLog.Guardar_Log_Error(Log_Error_sis, ref msg); return(false); } }
public Boolean ModificarDB(prd_CotizacionCompras_Info info, ref string msg) { try { return(data.ModificarDB(info, ref msg)); } 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(prd_CotizacionCompras_Bus) }; } }
internal void set_Info(prd_CotizacionCompras_Info InfoCotiza) { throw new NotImplementedException(); }