Esempio n. 1
0
        public static string ModifyProcessus(PNPU_PROCESS input, string processID)
        {
            string[] requests   = { "UPDATE PNPU_PROCESS SET PROCESS_LABEL = @PROCESS_LABEL, IS_LOOPABLE = @IS_LOOPABLE WHERE ID_PROCESS = @ID_PROCESS" };
            string[] parameters = new string[] { "@ID_PROCESS", processID, "@PROCESS_LABEL", input.PROCESS_LABEL, "@IS_LOOPABLE", input.IS_LOOPABLE };

            return(DataManagerSQLServer.ExecuteSqlTransaction(requests, "PNPU_PROCESS", parameters, false));

            /*using (var conn = new System.Data.SqlClient.SqlConnection(ParamAppli.ConnectionStringBaseAppli))
             * {
             *  try
             *  {
             *      conn.Open();
             *      using (var cmd = new System.Data.SqlClient.SqlCommand("UPDATE PNPU_PROCESS SET PROCESS_LABEL = @PROCESS_LABEL, IS_LOOPABLE = @IS_LOOPABLE WHERE ID_PROCESS = @ID_PROCESS", conn))
             *      {
             *          cmd.Parameters.Add("@ID_PROCESS", SqlDbType.Int).Value = processID;
             *          cmd.Parameters.Add("@PROCESS_LABEL", SqlDbType.VarChar, 254).Value = input.PROCESS_LABEL;
             *          cmd.Parameters.Add("@IS_LOOPABLE", SqlDbType.VarChar, 254).Value = input.IS_LOOPABLE;
             *          int rowsAffected = cmd.ExecuteNonQuery();
             *      }
             *  }
             *  catch (SqlException ex)
             *  {
             *      return ex.ToString();
             *  }
             *  return "Requête traitée avec succès et création d’un document.";
             * }*/
        }
Esempio n. 2
0
        public static string CreateProcess(PNPU_PROCESS input)
        {
            string[] requests   = { "INSERT INTO PNPU_PROCESS ( PROCESS_LABEL, IS_LOOPABLE) VALUES( @PROCESS_LABEL, @IS_LOOPABLE)" };
            string[] parameters = new string[] { "@PROCESS_LABEL", input.PROCESS_LABEL, "@IS_LOOPABLE", input.IS_LOOPABLE };

            return(DataManagerSQLServer.ExecuteSqlTransaction(requests, "PNPU_PROCESS", parameters, true));

            /*string sRequest = "INSERT INTO PNPU_PROCESS ( PROCESS_LABEL, IS_LOOPABLE) VALUES( @PROCESS_LABEL, @IS_LOOPABLE)";
             * string sTable = "PNPU_PROCESS";
             * string result = DataManagerSQLServer.SendTransactionWithGetLastPKid(sRequest, input, sTable);
             *
             * return result;*/
        }
Esempio n. 3
0
 public string ModifyProcessus(PNPU_PROCESS input, string processID)
 {
     return(RequestTool.ModifyProcessus(input, processID));
 }
Esempio n. 4
0
 public string CreateProcess(PNPU_PROCESS input)
 {
     return(RequestTool.CreateProcess(input));
 }