Exemple #1
0
        public static void Delete(int Cod_Instrumento, Context cx = null)
        {
            if (cx == null)
            {
                cx = new Context();
            }

            cx.Execute(@"delete from Instrumento where Cod_Instrumento = @Cod_Instrumento", new { Cod_Instrumento = Cod_Instrumento });
            MemoryContext.CleanCache <List <Instrumento> >();
        }
Exemple #2
0
        public static void Delete(int Cod_Tipo, Context cx = null)
        {
            if (cx == null)
            {
                cx = new Context();
            }

            cx.Execute(@"delete from TipoEstudo where Cod_Tipo = @Cod_Tipo", new { Cod_Tipo = Cod_Tipo });
            MemoryContext.CleanCache <List <TipoEstudo> >();
        }
Exemple #3
0
        public static void Delete(int Cod_Categoria, Context cx = null)
        {
            if (cx == null)
            {
                cx = new Context();
            }

            cx.Execute(@"delete from Categoria where Cod_Categoria = @Cod_Categoria", new { Cod_Categoria = Cod_Categoria });
            MemoryContext.CleanCache <List <Categoria> >();
        }
Exemple #4
0
        public static void Delete(int Cod_Usuario, int Cod_Comum, Context cx = null)
        {
            if (cx == null)
            {
                cx = new Context();
            }

            cx.Execute(@"delete from Usuario where Cod_Usuario = @Cod_Usuario and Cod_Comum = @Cod_Comum", new { Cod_Usuario, Cod_Comum });
            MemoryContext.CleanCache <List <UsuarioComum> >(Cod_Comum);
            MemoryContext.CleanCache <Dash>(Cod_Comum);
        }
Exemple #5
0
        public static void Delete(int Cod_Grupo, int Cod_Comum, Context cx = null)
        {
            if (cx == null)
            {
                cx = new Context();
            }

            cx.Execute(@"delete from Grupo where Cod_Grupo = @Cod_Grupo", new { Cod_Grupo = Cod_Grupo });

            MemoryContext.CleanCache <List <Grupo> >(Cod_Comum);
        }
Exemple #6
0
 public void Save(Context cx = null)
 {
     if (this.Cod_Instrumento == 0)
     {
         this.Cod_Instrumento = Insert(cx);
     }
     else
     {
         Update(cx);
     }
     MemoryContext.CleanCache <List <Instrumento> >();
 }
Exemple #7
0
 public void Save(Context cx = null)
 {
     if (this.Cod_Tipo == 0)
     {
         this.Cod_Tipo = Insert(cx);
     }
     else
     {
         Update(cx);
     }
     MemoryContext.CleanCache <List <TipoEstudo> >();
 }
Exemple #8
0
 public void Save(Context cx = null)
 {
     if (this.Cod_Categoria == 0)
     {
         this.Cod_Categoria = Insert(cx);
     }
     else
     {
         Update(cx);
     }
     MemoryContext.CleanCache <List <Categoria> >();
 }
Exemple #9
0
 public void Save(Context cx = null)
 {
     if (this.Cod_Usuario == 0)
     {
         this.Cod_Usuario = Insert(cx);
     }
     else
     {
         Update(cx);
     }
     MemoryContext.CleanCache <List <UsuarioComum> >(this.Cod_Comum);
     MemoryContext.CleanCache <Dash>(this.Cod_Comum);
 }
Exemple #10
0
        public void Save(Context cx = null)
        {
            if (this.Cod_Grupo == 0)
            {
                this.Cod_Grupo = Insert(cx);
            }
            else
            {
                Update(cx);
            }

            MemoryContext.CleanCache <List <Grupo> >(Cod_Comum);
        }