Ejemplo n.º 1
0
        /*Funcion: insertar procesos
          Param: ProcessInsertView,AuditDataFromWeb
          Return: status
          */
        public CUDView insertProcess(ProcessInsertView process, AuditDataFromWeb audit)
        {
            ProcessDao Dao = new ProcessDao();
            String state = Dao.insertProcess(process);
            CUDView logic = CUDVerifyLogic.verifierInsertDeleteUpdate("insert", state);

            if (logic.insert == true)
            {
                AuditService auditservice = new AuditService();
                String Action = "Insert new process";
                String NewValues = "ProcessName: " + process.ProcessName
                    + ", ProcessParameterSet: " + process.ProcessParameterSet
                    + ", ProcessPlotEnable: " + process.ProcessPlotEnable
                    + ", ProductLineId: " + process.ProductLineId;

                auditservice.formInsert(Action, NewValues, audit);
            }
            return logic;
        }
Ejemplo n.º 2
0
        /*Funcion: Insertar productos
          Param: ProductLineName,AuditDataFromWeb
          Return: status
          */
        public CUDView insertProduct(String ProductLineName, AuditDataFromWeb audit)
        {
            ProcessDao Dao = new ProcessDao();
            String state = Dao.insertProduct(ProductLineName);
            CUDView logic = CUDVerifyLogic.verifierInsertDeleteUpdate("insert", state);

            if (logic.insert == true)
            {
                AuditService auditservice = new AuditService();
                String Action = "Insert new ProductLineName";
                String NewValues = "ProductLineName: " + ProductLineName;

                auditservice.formInsert(Action, NewValues, audit);
            }
            return logic;
        }
Ejemplo n.º 3
0
        /*Funcion: actualizar productos
          Param: ProductUpdateView,AuditDataFromWeb
          Return: Lista Units
          */
        public CUDView updateProduct(ProductUpdateView product, AuditDataFromWeb audit)
        {
            CUDView logic = new CUDView();
            AuditDao auditDao = new AuditDao();
            DataTable auditDaoResult = auditDao.getProductsOldValues(product.ProductLineId);
            String OldValues = "ProductId: " + product.ProductLineId;

            foreach (DataRow row in auditDaoResult.Rows)
            {
                if (auditDaoResult.Columns.Contains("Product") && row["Product"] != DBNull.Value) { OldValues = OldValues + ", Product: " + row["Product"].ToString(); }
            }

            ProcessDao Dao = new ProcessDao();
            String state = Dao.updateProduct(product);
            logic=CUDVerifyLogic.verifierInsertDeleteUpdate("update", state);

            if (logic.update == true)
            {
                AuditService auditservice = new AuditService();
                String Action = "Update Product";
                String newValues = "ProductId: " + product.ProductLineId;
                newValues = newValues + ", Product: " + product.ProductLineName;

                auditservice.formUpdate(Action, newValues, OldValues, audit);
            }

            return logic;
        }
Ejemplo n.º 4
0
 public List<ProcessView> getProcess()
 {
     ProcessDao Dao = new ProcessDao();
     DataTable DaoResult = Dao.getProcess();
     return buildProcess(DaoResult);
 }
Ejemplo n.º 5
0
 /*Funcion: buscar procesos por los datos consultados
   Param: dato de busqueda
   Return: status
   */
 public List<ProcessView> searchProcess(String partial)
 {
     ProcessDao Dao = new ProcessDao();
     DataTable DaoResult = Dao.searchProcess(partial);
     return buildProcess(DaoResult);
 }