Example #1
0
 public static void Cadastrar(NOW now)
 {
     using (var ctx = new NowContext())
     {
         ctx.Now.Add(now);
         ctx.SaveChanges();
     }
 }
Example #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();
     }
 }
Example #3
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();
     }
 }
Example #4
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();
     }
 }
Example #5
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();
     }
 }
Example #6
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();
     }
 }
Example #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();
     }
 }
Example #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();
     }
 }
Example #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();
            }
        }
Example #10
0
 public ActionResult FinanceiroNOW(NOW now)
 {
     FinanceiroDAO.CadastrarFinanceiro(now);
     return(RedirectToAction("Index"));
 }
Example #11
0
 protected override void When()
 {
     SUT.SetPeriod(NOW, NOW.AddMonths(1));
 }
Example #12
0
        public ActionResult FinanceiroNOW(int Id_Now)
        {
            NOW now = NowDAO.pesquisarID(Id_Now);

            return(View(now));
        }
Example #13
0
 public ActionResult ProdSoftNOW(NOW now)
 {
     ProdSoftDAO.CadastrarProdSoft(now);
     return(RedirectToAction("Index"));
 }
Example #14
0
 public ActionResult GerarNOW(NOW now)
 {
     DAO.NowDAO.Cadastrar(now);
     return(RedirectToAction("Index"));
 }
Example #15
0
        public ActionResult ProdSoftNOW(int Id_Now)
        {
            NOW now = NowDAO.pesquisarID(Id_Now);

            return(View(now));
        }
Example #16
0
 public ActionResult TiNOW(NOW now)
 {
     TiDAO.CadastrarTi(now);
     return(RedirectToAction("Index"));
 }
Example #17
0
        public ActionResult DetalhesNOW(int Id)
        {
            NOW Now = DAO.NowDAO.pesquisarID(Id);

            return(View(Now));
        }
Example #18
0
 public ActionResult ComprasNOW(NOW now)
 {
     ComprasDAO.CadastrarCompras(now);
     return(RedirectToAction("Index"));
 }
Example #19
0
        public ActionResult QualidadeNOW(int Id_Now)
        {
            NOW now = NowDAO.pesquisarID(Id_Now);

            return(View(now));
        }
Example #20
0
 public ActionResult QualidadeNOW(NOW now)
 {
     QualidadeDAO.CadastrarQualidade(now);
     return(RedirectToAction("Index"));
 }
Example #21
0
        public ActionResult ComprasNOW(int Id_Now)
        {
            NOW now = NowDAO.pesquisarID(Id_Now);

            return(View(now));
        }