Ejemplo n.º 1
0
 private void BindCategories()
 {
     lbCategory.DataSource     = CalendarEntry.GetListCategoriesAll();
     lbCategory.DataTextField  = "CategoryName";
     lbCategory.DataValueField = "CategoryId";
     lbCategory.DataBind();
 }
Ejemplo n.º 2
0
 IDataReader GetCategoriesReader(int ObjectType, int ObjectID, Label lblTextHeader, ListBox lbCategories)
 {
     if (ObjectType == (int)ObjectTypes.Issue)
     {
         lblTextHeader.Text      = LocRM.GetString("TextHeaderInc");
         lbCategories.DataSource = Incident.GetListCategoriesAll();
         return(Incident.GetListCategories(ObjectID));
     }
     if (ObjectType == (int)ObjectTypes.ToDo)
     {
         lblTextHeader.Text      = LocRM.GetString("TextHeaderToDo");
         lbCategories.DataSource = ToDo.GetListCategoriesAll();
         return(ToDo.GetListCategories(ObjectID));
     }
     if (ObjectType == (int)ObjectTypes.CalendarEntry)
     {
         lblTextHeader.Text      = LocRM.GetString("TextHeaderCalEntry");
         lbCategories.DataSource = CalendarEntry.GetListCategoriesAll();
         return(CalendarEntry.GetListCategories(ObjectID));
     }
     return(null);
 }