Exemplo n.º 1
0
    public static DataBaseExecute.ReturnResult InsertCancellationResults(int idAccount, string ReasonsRemovalTests, int idResult)
    {
        // делаем запрос с введеным в тектовое поле логином
        SqlCommand command = new SqlCommand(SQLQuery.InsertCancellationResults);

        command.Parameters.AddWithValue("@UserID", idAccount);
        command.Parameters.AddWithValue("@Reason", ReasonsRemovalTests);
        command.Parameters.AddWithValue("@prohozhdenie_testa_archive", idResult);
        return(DataBaseExecute.ExecuteNonQuery(command, false));
    }
Exemplo n.º 2
0
    public static DataBaseExecute.ReturnResult prohozhdenie_testa_archive(int accountId)
    {
        if (accountId == 0)
        {
            return new DataBaseExecute.ReturnResult()
                   {
                       StatusExecute = DataBaseExecute.ReturnResult.Status.Error, ErrorMsg = "Значение idKabinet указано неверно"
                   }
        }
        ;
        SqlCommand command = new SqlCommand(SQLQuery.InsertIntOprohozhdenieTestaArchive);

        command.Parameters.AddWithValue("@ID_testiruemyj", accountId);
        return(DataBaseExecute.ExecuteNonQuery(command, true));
    }
Exemplo n.º 3
0
    public static DataBaseExecute.ReturnResult DeleteTestirovanie(int accountId)
    {
        if (accountId == 0)
        {
            return new DataBaseExecute.ReturnResult()
                   {
                       StatusExecute = DataBaseExecute.ReturnResult.Status.Error, ErrorMsg = "Значение idKabinet указано неверно"
                   }
        }
        ;
        SqlCommand command = new SqlCommand(SQLQuery.DeleteTestirovanie);

        command.Parameters.AddWithValue("@IDtestiruemyj", accountId);
        return(DataBaseExecute.ExecuteNonQuery(command, false));
    }
Exemplo n.º 4
0
    public static DataBaseExecute.ReturnResult DeleteProhozhdenieTesta(int idKabinet)
    {
        if (idKabinet == 0)
        {
            return new DataBaseExecute.ReturnResult()
                   {
                       StatusExecute = DataBaseExecute.ReturnResult.Status.Error, ErrorMsg = "Значение idKabinet указано неверно"
                   }
        }
        ;
        SqlCommand command = new SqlCommand(SQLQuery.DeleteProhozhdenieTesta);

        command.Parameters.AddWithValue("@IDKabinet", idKabinet);
        return(DataBaseExecute.ExecuteNonQuery(command, false));
    }