I have 3 simple similar event handler functions that I would like to refactor. Any suggestions?
private void btnBuildingList_Click(object sender, EventArgs e)
{
selectedExportType = (int)ExportType.Building;
path = csvFilePath + String.Format("{0:yyyy-MM-dd}", datDate.DateTime) + "-BuildingList.csv";
Export();
}
private void btnOwnerList_Click(object sender, EventArgs e)
{
selectedExportType = (int)ExportType.Persons;
path = csvFilePath + String.Format("{0:yyyy-MM-dd}", datDate.DateTime) + "-OwnerList.csv";
Export();
}
private void btnFacts_Click(object sender, EventArgs e)
{
selectedExportType = (int)ExportType.Facts;
path = csvFilePath + String.Format("{0:yyyy-MM-dd}", datDate.DateTime) + "-FactsData.csv";
Export();
}