コード例 #1
0
 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;
     }
 }
コード例 #2
0
        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;
                }
            }
        }
コード例 #3
0
 public void Delete(TourPackageConfig config)
 {
     _commonDao.DeleteObject(config);
 }
コード例 #4
0
 public void SaveOrUpdate(TourPackageConfig config)
 {
     _commonDao.SaveOrUpdateObject(config);
 }