public Boolean ModificarDB(cxc_cobro_tipo_x_cobros_Docxc_Info Info)
 {
     try
     {
         Boolean res = false;
         EntitiesCuentas_x_Cobrar context = new EntitiesCuentas_x_Cobrar();
         var address = context.cxc_cobro_tipo_x_cobros_Docxc.FirstOrDefault(var => var.IdCobro_tipo == Info.IdCobro_tipo);
         if (address != null)
         {
             address.Posicion = Info.Posicion;
             context.SaveChanges();
             res = true;
         }
         return(res);
     }
     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);
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
         mensaje = ex.ToString() + " " + ex.Message;
         throw new Exception(ex.ToString());
     }
 }
        public List <cxc_cobro_tipo_x_cobros_Docxc_Info> Get_List_cobro_tipo_x_cobros_Docxc(ref string mensaje)
        {
            try
            {
                List <cxc_cobro_tipo_x_cobros_Docxc_Info> lst = new List <cxc_cobro_tipo_x_cobros_Docxc_Info>();
                EntitiesCuentas_x_Cobrar context = new EntitiesCuentas_x_Cobrar();

                var select = from q in context.cxc_cobro_tipo_x_cobros_Docxc
                             orderby q.Posicion
                             select q;

                cxc_cobro_tipo_x_cobros_Docxc_Info _Info;
                foreach (var item in select)
                {
                    _Info = new cxc_cobro_tipo_x_cobros_Docxc_Info();
                    _Info.IdCobro_tipo = item.IdCobro_tipo;
                    _Info.Posicion     = item.Posicion;
                    lst.Add(_Info);
                }
                return(lst);
            }
            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);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.InnerException + " " + ex.Message;
                throw new Exception(ex.InnerException.ToString());
            }
        }
 public Boolean Guardar(cxc_cobro_tipo_x_cobros_Docxc_Info Info)
 {
     try
     {
         return(data.GuardarDB(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("", "Guardar", ex.Message), ex)
               {
                   EntityType = typeof(cxc_cobro_tipo_x_cobros_Docxc_Bus)
               };
     }
 }
        public Boolean GuardarDB(cxc_cobro_tipo_x_cobros_Docxc_Info Info)
        {
            try
            {
                EntitiesCuentas_x_Cobrar context = new EntitiesCuentas_x_Cobrar();
                var address = new cxc_cobro_tipo_x_cobros_Docxc();
                address.IdCobro_tipo = Info.IdCobro_tipo;
                address.Posicion     = Info.Posicion;
                context.cxc_cobro_tipo_x_cobros_Docxc.Add(address);
                context.SaveChanges();

                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);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.InnerException + " " + ex.Message;
                throw new Exception(ex.InnerException.ToString());
            }
        }