Ejemplo n.º 1
0
        public Boolean GuardarDB(tb_sis_tipoDocumento_Info Info)
        {
            try
            {
                EntitiesGeneral context = new EntitiesGeneral();
                var             address = new tb_sis_Documento_Tipo();

                address.codDocumentoTipo = Info.IdTipoDocumento;
                address.descripcion      = Info.Descripcion;
                address.estado           = Info.Estado;
                address.Posicion         = Info.Posicion;

                context.tb_sis_Documento_Tipo.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.ToString() + " " + ex.Message;
                throw new Exception(ex.ToString());
            }
        }
Ejemplo n.º 2
0
 public List <tb_sis_tipoDocumento_Info> Get_List_sis_tipoDocumento()
 {
     try
     {
         List <tb_sis_tipoDocumento_Info> lm = new List <tb_sis_tipoDocumento_Info>();
         EntitiesGeneral OEGeneral           = new EntitiesGeneral();
         var             q = from A in OEGeneral.tb_sis_Documento_Tipo
                             orderby A.Posicion
                             select A;
         foreach (var item in q)
         {
             tb_sis_tipoDocumento_Info info = new tb_sis_tipoDocumento_Info();
             info.IdTipoDocumento = item.codDocumentoTipo.Trim();
             info.Descripcion     = item.descripcion.Trim();
             info.Estado          = item.estado;
             info.Posicion        = Convert.ToInt32(item.Posicion);
             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);
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
         mensaje = ex.ToString() + " " + ex.Message;
         throw new Exception(ex.ToString());
     }
 }
 public void setInfo(tb_sis_tipoDocumento_Info Info)
 {
     try
     {
         this.Info = Info;
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
         MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Ejemplo n.º 4
0
 public Boolean ModificarDB(tb_sis_tipoDocumento_Info Info)
 {
     try
     {
         return(data.ModificarDB(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("", "Modificar", ex.Message), ex)
               {
                   EntityType = typeof(tb_sis_tipoDocumento_Bus)
               };
     }
 }
 void LimpiarDatos()
 {
     try
     {
         Info                = new tb_sis_tipoDocumento_Info();
         _Accion             = Cl_Enumeradores.eTipo_action.grabar;
         txtCodigo.Text      = "";
         txtDescripcion.Text = "";
         txtPosicion.Text    = "";
         ckEstado.Checked    = true;
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
         MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }