public override DataSet Clone() { VoterData data = (VoterData)base.Clone(); data.InitVars(); return(data); }
/// <summary> /// Returns all voters who have answered an invitation /// </summary> public VoterData GetVotersInvitationAnswered(int surveyId, int pageNumber, int pageSize, out int totalRecords) { VoterData dataSet = new VoterData(); //SqlParameter[] commandParameters = new SqlParameter[] //{ new SqlParameter("@SurveyID", surveyId), // new SqlParameter("@CurrentPage", pageNumber), // new SqlParameter("@PageSize", pageSize), // new SqlParameter("@TotalRecords", SqlDbType.Int) }; //commandParameters[3].Direction = ParameterDirection.Output; ArrayList commandParameters = new ArrayList(); { commandParameters.Add(new SqlParameter("@SurveyId", surveyId).SqlValue); commandParameters.Add(new SqlParameter("@CurrentPage", pageNumber).SqlValue); commandParameters.Add(new SqlParameter("@PageSize", pageSize).SqlValue); commandParameters.Add(new SqlParameter("@TotalRecords", SqlDbType.Int){Direction = ParameterDirection.Output}.SqlValue); } DbConnection.db.LoadDataSet("vts_spVoterInvitationAnsweredGetAll", dataSet, new string[] { "Voters" }, commandParameters.ToArray()); //totalRecords = int.Parse(commandParameters[3].ToString()); //note: output parameter redundant, no longer used; cannot be combined with dataSet output; totalRecords = dataSet.Voters.Rows.Count; return dataSet; }
public void RemoveVotersRow(VoterData.VotersRow row) { base.Rows.Remove(row); }
public VotersRowChangeEvent(VoterData.VotersRow row, DataRowAction action) { this.eventRow = row; this.eventAction = action; }
public void AddVotersRow(VoterData.VotersRow row) { base.Rows.Add(row); }