Exemplo n.º 1
0
        public List <cp_Aprobacion_Orden_Pago_Det_Info> Get_List_Aprobacion_Orden_Pago_Det(int IdEmpresa, string Estado)
        {
            try
            {
                lista = new List <cp_Aprobacion_Orden_Pago_Det_Info>();


                EntitiesCuentasxPagar ORol = new EntitiesCuentasxPagar();

                var sresult = from A in ORol.vwcp_orden_pago_con_cancelacion
                              where A.IdEmpresa == IdEmpresa && A.IdEstadoAprobacion == Estado
                              select A;

                foreach (var item in sresult)
                {
                    cp_Aprobacion_Orden_Pago_Det_Info Reg = new cp_Aprobacion_Orden_Pago_Det_Info();

                    Reg.IdEmpresa_OP              = item.IdEmpresa;
                    Reg.IdOrdenPago_OP            = item.IdOrdenPago;
                    Reg.Fecha_OP                  = item.Fecha_OP;
                    Reg.Nom_Beneficiario          = item.Nom_Beneficiario;
                    Reg.Referencia                = item.Referencia;
                    Reg.Fecha_Pago                = item.Fecha_Pago;
                    Reg.Saldo_x_Pagar_OP          = item.Saldo_x_Pagar_OP;
                    Reg.Valor_estimado_a_pagar_OP = item.Valor_estimado_a_pagar_OP;
                    Reg.IdFormaPago               = item.IdFormaPago;
                    Reg.IdEstadoAprobacion        = item.IdEstadoAprobacion;
                    Reg.IdEntidad                 = item.IdEntidad;
                    Reg.IdPersona                 = Convert.ToDecimal(item.IdPersona);
                    Reg.IdTipoPersona             = item.IdTipoPersona;
                    Reg.TotalCancelado            = item.Total_cancelado_OP;
                    Reg.Secuencia_OP              = item.Secuencia_OP;

                    lista.Add(Reg);
                }
                return(lista);
            }
            catch (Exception ex)
            {
                string mensaje = "";
                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());
            }
        }
Exemplo n.º 2
0
        public void GetDetalle()
        {
            try
            {
                Listdet = new List <cp_Aprobacion_Orden_Pago_Det_Info>();

                foreach (var item in Obj_DetalleAprob)
                {
                    if (item.Check == true)
                    {
                        cp_Aprobacion_Orden_Pago_Det_Info info_det = new cp_Aprobacion_Orden_Pago_Det_Info();


                        // detalle de update
                        info_det.IdEmpresa          = param.IdEmpresa;
                        info_det.Fecha_OP           = item.Fecha_OP;
                        info_det.IdFormaPago        = item.IdFormaPago;
                        info_det.Fecha_Pago         = item.Fecha_Pago;
                        info_det.IdEstadoAprobacion = item.IdEstadoAprobacion;
                        info_det.Motivo             = item.Observacion;
                        info_det.Usuario            = param.IdUsuario;

                        //detalle de aprobación
                        info_det.IdAprobacion   = item.IdAprobacion;
                        info_det.IdEmpresa_OP   = item.IdEmpresa;
                        info_det.Secuencia_OP   = item.Secuencia_OP;
                        info_det.IdOrdenPago_OP = item.IdOrdenPago;

                        Listdet.Add(info_det);
                    }
                }
            }
            catch (Exception ex)
            {
                Log_Error_bus.Log_Error(ex.ToString());
                MessageBox.Show(ex.ToString(), param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }