Inheritance: INotifyPropertyChanging, INotifyPropertyChanged
コード例 #1
0
 // get uninterested in a theme category.
 public void getUninterestedThemeCategory(CategoriasTematica themeCategory)
 {
     // remove interest from the database.
     try
     {
         IndignadoDBDataContext indignadoContext = new IndignadoDBDataContext();
         indignadoContext.ExecuteCommand("DELETE FROM Intereses WHERE (idCategoriaTematica = {0}) AND (idUsuario = {1})", themeCategory.id, UserInfo.Id);
         indignadoContext.SubmitChanges();
     }
     catch (Exception error)
     {
     }
 }
コード例 #2
0
        // adds a new theme category.
        public void addThemeCategory(CategoriasTematica themeCategory)
        {
            // set foreign ids
            themeCategory.idMovimiento = IdMovement;

            // add the theme category to the database
            try
            {
                IndignadoDBDataContext indignadoContext = new IndignadoDBDataContext();
                indignadoContext.CategoriasTematicas.InsertOnSubmit(themeCategory);
                indignadoContext.SubmitChanges();
            }
            catch (Exception error)
            {
            }
        }
コード例 #3
0
        // get interested in a theme category.
        public void getInterestedThemeCategory(CategoriasTematica themeCategory)
        {
            // create an interest
            Interese interest = new Interese();
            interest.idCategoriaTematica = themeCategory.id;
            interest.idUsuario = UserInfo.Id;

            // add interest to the database.
            try
            {
                IndignadoDBDataContext indignadoContext = new IndignadoDBDataContext();
                indignadoContext.Intereses.InsertOnSubmit(interest);
                indignadoContext.SubmitChanges();
            }
            catch (Exception error)
            {
            }
        }
コード例 #4
0
ファイル: Datatypes.cs プロジェクト: Throy/derp-octo-robot
 public static DTThemeCategoryMeetings ThemeCategoryToDTMeetings(CategoriasTematica themeCategory)
 {
     DTThemeCategoryMeetings dtThemeCategory = new DTThemeCategoryMeetings();
     dtThemeCategory.id = themeCategory.id;
     dtThemeCategory.idMovement = themeCategory.idMovimiento;
     dtThemeCategory.title = themeCategory.titulo;
     dtThemeCategory.description = themeCategory.descripcion;
     dtThemeCategory.myInterest = (themeCategory.miInteres == null) ? 0 : themeCategory.miInteres.Value;
     return dtThemeCategory;
 }
コード例 #5
0
ファイル: Datatypes.cs プロジェクト: Throy/derp-octo-robot
 public static CategoriasTematica DTToThemeCategory(DTThemeCategory dtThemeCategory)
 {
     CategoriasTematica themeCategory = new CategoriasTematica();
     themeCategory.id = dtThemeCategory.id;
     themeCategory.idMovimiento = dtThemeCategory.idMovement;
     themeCategory.titulo = dtThemeCategory.title;
     themeCategory.descripcion = dtThemeCategory.description;
     themeCategory.miInteres = dtThemeCategory.myInterest;
     return themeCategory;
 }
コード例 #6
0
 partial void DeleteCategoriasTematica(CategoriasTematica instance);
コード例 #7
0
 partial void UpdateCategoriasTematica(CategoriasTematica instance);
コード例 #8
0
 partial void InsertCategoriasTematica(CategoriasTematica instance);
コード例 #9
0
		private void detach_CategoriasTematicas(CategoriasTematica entity)
		{
			this.SendPropertyChanging();
			entity.Movimiento = null;
		}
コード例 #10
0
 // removes a current theme category.
 public bool removeThemeCategory(CategoriasTematica themeCategory)
 {
     try
     {
         IndignadoDBDataContext indignadoContext = new IndignadoDBDataContext();
         indignadoContext.ExecuteCommand("DELETE FROM CategoriasTematicas WHERE (id = {0})", themeCategory.id);
         return true;
     }
     catch {
         return false;
     }
 }