Esempio n. 1
0
        public Decimal PreFacturar_x_periodo(fa_pre_facturacion_Info info)
        {
            try
            {
                Decimal IdPrefacturacion = 0;

                using (Entity_Facturacion_FJ Context = new Entity_Facturacion_FJ())
                {
                    var Id = Context.spFa_Pre_facturar_x_periodo(info.IdEmpresa, info.IdPreFacturacion, info.IdPeriodo, info.IdEstado_Proceso, info.fecha, info.Observacion).FirstOrDefault();
                    if (Id != null)
                    {
                        IdPrefacturacion = Convert.ToDecimal(Id);
                    }
                }

                return(IdPrefacturacion);
            }
            catch (Exception ex)
            {
                string MensajeError = "";
                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 MensajeError);
                MensajeError = ex.ToString();
                throw new Exception(ex.ToString());
            }
        }