Esempio n. 1
0
 public static void Cadastrar(NOW now)
 {
     using (var ctx = new NowContext())
     {
         ctx.Now.Add(now);
         ctx.SaveChanges();
     }
 }
Esempio n. 2
0
 public static void CadastrarCompras(NOW now)
 {
     using (var ctx = new NowContext())
     {
         ctx.Now.Find(now.ID_now).Compras        = now.Compras;
         ctx.Now.Find(now.ID_now).Compras_status = true;
         ctx.SaveChanges();
     }
 }
Esempio n. 3
0
 public static void CadastrarQualidade(NOW now)
 {
     using (var ctx = new NowContext())
     {
         ctx.Now.Find(now.ID_now).Qualidade        = now.Qualidade;
         ctx.Now.Find(now.ID_now).Qualidade_status = true;
         ctx.SaveChanges();
     }
 }
Esempio n. 4
0
 public static void CadastrarTi(NOW now)
 {
     using (var ctx = new NowContext())
     {
         ctx.Now.Find(now.ID_now).TI        = now.TI;
         ctx.Now.Find(now.ID_now).TI_status = true;
         ctx.SaveChanges();
     }
 }
Esempio n. 5
0
 public static void CadastrarFinanceiro(NOW now)
 {
     using (var ctx = new NowContext())
     {
         ctx.Now.Find(now.ID_now).Financeiro        = now.Financeiro;
         ctx.Now.Find(now.ID_now).Financeiro_status = true;
         ctx.SaveChanges();
     }
 }
Esempio n. 6
0
 public static void CadastrarProdSoft(NOW now)
 {
     using (var ctx = new NowContext())
     {
         ctx.Now.Find(now.ID_now).ProdSoft        = now.ProdSoft;
         ctx.Now.Find(now.ID_now).ProdSoft_status = true;
         ctx.SaveChanges();
     }
 }
Esempio n. 7
0
 public static void CadastrarEngenharia(NOW now)
 {
     using (var ctx = new NowContext())
     {
         ctx.Now.Find(now.ID_now).Engenharia           = now.Engenharia;
         ctx.Now.Find(now.ID_now).NecessitaNovaMaquina = now.NecessitaNovaMaquina;
         ctx.Now.Find(now.ID_now).DescricaoMaquina     = now.DescricaoMaquina;
         ctx.Now.Find(now.ID_now).Engenharia_status    = true;
         ctx.SaveChanges();
     }
 }
Esempio n. 8
0
 public static void CadastrarProduto(NOW now)
 {
     using (var ctx = new NowContext())
     {
         ctx.Now.Find(now.ID_now).Produto           = now.Produto;
         ctx.Now.Find(now.ID_now).Produto_status    = true;
         ctx.Now.Find(now.ID_now).Qualidade_status  = now.Qualidade_status == true ? false : true;
         ctx.Now.Find(now.ID_now).Engenharia_status = now.Engenharia_status == true ? false : true;
         ctx.Now.Find(now.ID_now).ProdSoft_status   = now.ProdSoft_status == true ? false : true;
         ctx.Now.Find(now.ID_now).TI_status         = now.TI_status == true ? false : true;
         ctx.SaveChanges();
     }
 }
Esempio n. 9
0
        /*public static void CadastrarQualidade(NOW now)
         * {
         *  using (var ctx = new NowContext())
         *  {
         *      ctx.Now.Find(now.ID_now).Qualidade = now.Qualidade;
         *      ctx.Now.Find(now.ID_now).Qualidade_status = true;
         *      ctx.SaveChanges();
         *  }
         * }*/
        #endregion

        #region Cadastrar TI

        /* public static void CadastrarTI(NOW now)
         * {
         *   using (var ctx = new NowContext())
         *   {
         *       ctx.Now.Find(now.ID_now).TI = now.TI;
         *       ctx.Now.Find(now.ID_now).TI_status = true;
         *       ctx.SaveChanges();
         *   }
         * }*/
        #endregion

        #region Editar TUDO
        public static void editarTudo(NOW now)
        {
            using (var ctx = new NowContext())
            {
                ctx.Now.Find(now.ID_now).Nome       = now.Nome;
                ctx.Now.Find(now.ID_now).Descricao  = now.Descricao;
                ctx.Now.Find(now.ID_now).Compras    = now.Compras;
                ctx.Now.Find(now.ID_now).Engenharia = now.Engenharia;
                ctx.Now.Find(now.ID_now).Qualidade  = now.Qualidade;
                ctx.Now.Find(now.ID_now).TI         = now.TI;

                ctx.Now.Find(now.ID_now).Compras_status    = now.Compras_status;
                ctx.Now.Find(now.ID_now).Engenharia_status = now.Engenharia_status;
                ctx.Now.Find(now.ID_now).Qualidade_status  = now.Qualidade_status;
                ctx.Now.Find(now.ID_now).TI_status         = now.TI_status;

                ctx.SaveChanges();
            }
        }