Пример #1
0
        public Boolean eliminar(string IdTipoFormaPago, int count)
        {
            try
            {
                EntitiesFacturacion context = new EntitiesFacturacion();


                for (int i = 0; i < count; i++)
                {
                    var select = context.fa_factura_TerminoPago_Distribucion.First(var => var.IdTipoFormaPago == IdTipoFormaPago);
                    context.DeleteObject((select));
                    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);
                mensaje = ex.InnerException + " " + ex.Message;
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                return(false);
            }
        }