protected void rptTourPackages_ItemCommand(object source, RepeaterCommandEventArgs e) { switch (e.CommandName.ToLower()) { case "select": TourPackageConfig config = new TourPackageConfig(); config.Tour = _tour; config.Package = _module.TourGetById(Convert.ToInt32(e.CommandArgument)); _module.SaveOrUpdate(config); GetTourConfigList(); rptTourConfigs.DataBind(); break; } }
protected void rptTourConfigs_ItemDataBound(object sender, RepeaterItemEventArgs e) { if (e.Item.DataItem is TourPackageConfig) { TourPackageConfig config = (TourPackageConfig)e.Item.DataItem; Label labelName = e.Item.FindControl("labelName") as Label; if (labelName != null) { labelName.Text = config.Package.Name; } Label labelProvider = e.Item.FindControl("labelProvider") as Label; if (labelProvider != null) { labelProvider.Text = config.Package.Provider.Name; } } }
public void Delete(TourPackageConfig config) { _commonDao.DeleteObject(config); }
public void SaveOrUpdate(TourPackageConfig config) { _commonDao.SaveOrUpdateObject(config); }