Exemple #1
0
    public void Insert(VotingProjectionInfo votingProjectionInfo)
    {
        String query = "INSERT INTO [dbo].[VotingProjection] "
                       + "([ClientID] "
                       + ",[EventID] "
                       + ",[CreditorID] "
                       + ",[QuestionID] "
                       + ",[Decision] "
                       + ",[CreditType] "
                       + ",[CreateUser] "
                       + ",[CreateDate] "
                       + ",[LastModifiedUser] "
                       + ",[LastModifiedDate] ) "
                       + "VALUES "
                       + "(@ClientID "
                       + ",@EventID "
                       + ",@CreditorID "
                       + ",@QuestionID "
                       + ",@Decision "
                       + ",@CreditType "
                       + ",@CreateUser "
                       + ",@CreateDate "
                       + ",@LastModifiedUser "
                       + ",@LastModifiedDate ) ";

        db.Execute(query, votingProjectionInfo, transaction);
    }
Exemple #2
0
 public void SaveVotingProjectionInfo(VotingProjectionInfo votingProjectionInfo)
 {
     if (this.IsExisted(votingProjectionInfo.ClientID, votingProjectionInfo.EventID, votingProjectionInfo.CreditorID, votingProjectionInfo.CreditType, votingProjectionInfo.QuestionID))
     {
         this.Update(votingProjectionInfo);
     }
     else
     {
         this.Insert(votingProjectionInfo);
     }
 }
Exemple #3
0
    public void Update(VotingProjectionInfo votingProjectionInfo)
    {
        String query = "UPDATE [dbo].[VotingProjection] "
                       + "SET "
                       + " [Decision] = @Decision "
                       + ",[LastModifiedUser] = @LastModifiedUser "
                       + ",[LastModifiedDate] = @LastModifiedDate "
                       + "WHERE ClientID = @ClientID AND EventID = @EventID AND CreditorID = @CreditorID AND CreditType = @CreditType AND QuestionID = @QuestionID ";

        db.Execute(query, votingProjectionInfo, transaction);
    }