public Boolean Guardar_AprobacionOrdenPago(cp_Aprobacion_Orden_Pago_Info Item, ref decimal Id, ref string mensaje)
        {
            try
            {
                using (EntitiesCuentasxPagar Context = new EntitiesCuentasxPagar())
                {
                    cp_Aprobacion_Orden_pago Cabe = new cp_Aprobacion_Orden_pago();

                    Cabe.IdEmpresa         = Item.IdEmpresa;
                    Cabe.IdAprobacion      = Id = GetIdAprobacionOrdenPago(Item.IdEmpresa);
                    Cabe.Fecha_Aprobacion  = Item.Fecha_Aprobacion;
                    Cabe.Observacion       = Item.Observacion;
                    Cabe.UsuarioAprobacion = Item.UsuarioAprobacion;
                    Cabe.Fecha_Transaccion = DateTime.Now;

                    Context.cp_Aprobacion_Orden_pago.Add(Cabe);
                    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());
            }
        }
Пример #2
0
 private void frmCP_AprobacionOrdenPago_Load(object sender, EventArgs e)
 {
     try
     {
         Carga_Combos();
         cp_Aprobacion_Orden_Pago_Info info = new cp_Aprobacion_Orden_Pago_Info();
         info.Fecha_Transaccion = param.Fecha_Transac;
     }
     catch (Exception ex)
     {
         Log_Error_bus.Log_Error(ex.ToString());
         MessageBox.Show(ex.ToString(), param.Nombre_sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #3
0
 public Boolean Guardar_AprobacionOrdenPago(cp_Aprobacion_Orden_Pago_Info Item, ref decimal Id, ref string mensaje)
 {
     try
     {
         return(oData.Guardar_AprobacionOrdenPago(Item, ref Id, ref mensaje));
     }
     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_AprobacionOrdenPago", ex.Message), ex)
               {
                   EntityType = typeof(cp_Aprobacion_Orden_Pago_Bus)
               };
     }
 }