Exemple #1
0
        public void deleteWidgetCatalog(int id)
        {
            DBHelper._WidgetCatalog dbhelp = new DBHelper._WidgetCatalog();
            WidgetCatalog           existingWidgetCatalog = dbhelp.GetByid(id);

            dbhelp.Delete(existingWidgetCatalog);
        }
Exemple #2
0
        public void updateWidgetCatalog(int id, Update widgetCatalog)
        {
            DBHelper._WidgetCatalog dbhelp = new DBHelper._WidgetCatalog();
            WidgetCatalog           existingWidgetCatalog = dbhelp.GetByid(id);

            existingWidgetCatalog.Name             = widgetCatalog.Name;
            existingWidgetCatalog.MessageCatalogID = widgetCatalog.MessageCatalogId;
            existingWidgetCatalog.Level            = widgetCatalog.Level;
            existingWidgetCatalog.WidgetClassKey   = widgetCatalog.WidgetClassKey;
            existingWidgetCatalog.Context          = widgetCatalog.Context;

            dbhelp.Update(existingWidgetCatalog);
        }
Exemple #3
0
        public Detail getWidgetCatalogById(int id)
        {
            DBHelper._WidgetCatalog dbhelp        = new DBHelper._WidgetCatalog();
            WidgetCatalog           widgetCatalog = dbhelp.GetByid(id);

            return(new Detail()
            {
                Id = widgetCatalog.Id,
                Name = widgetCatalog.Name,
                CompanyId = widgetCatalog.CompanyID,
                MessageCatalogId = widgetCatalog.MessageCatalogID,
                MessageCatalogName = (widgetCatalog.MessageCatalog == null ? "" : widgetCatalog.MessageCatalog.Name),
                Level = widgetCatalog.Level,
                WidgetClassKey = widgetCatalog.WidgetClassKey,
                Context = JObject.Parse(widgetCatalog.Context)
            });
        }