public static void Insert(TagModel tag)
        {
            DbCommand Command = db.GetStoredProcCommand("UP_cmsTag_Add");

            db.AddInParameter(Command, "@tagname", DbType.String, tag.TagName);
            db.AddInParameter(Command, "@xslttemplate", DbType.String, tag.XsltTemplate);
            db.AddInParameter(Command, "@defaultparameter", DbType.String, tag.DefaultParameter);
            db.AddInParameter(Command, "@dataprovider", DbType.String, tag.DataProvider);
            db.AddInParameter(Command, "@editcontrol", DbType.String, tag.EditControl);
            db.AddInParameter(Command, "@examplepicture", DbType.String, tag.ExamplePicture);
            db.AddInParameter(Command, "@ispublic", DbType.Boolean, tag.IsPublic);
            db.AddInParameter(Command, "@tagtype", DbType.Int16, tag.TagType);

            db.ExecuteNonQuery(Command);
        }
        public static TagModel GetModel(int TagID)
        {
            TagModel model = null;

            DataTable dt = TagDataAccess.Get(TagID);
            if (dt.Rows.Count > 0)
            {
                DataRow row = dt.Rows[0];
                model = new TagModel();

                model.TagID = Convert.ToInt32(row["tagid"]);
                model.TagName = Convert.ToString(row["tagname"]);
                model.XsltTemplate = Convert.ToString(row["xslttemplate"]);
                model.DataProvider = Convert.ToString(row["dataprovider"]);
                model.DefaultParameter = Convert.ToString(row["defaultparameter"]);
                model.EditControl = Convert.ToString(row["editcontrol"]);
                model.ExamplePicture = Convert.ToString(row["examplepicture"]);
                model.IsPublic = Convert.ToBoolean(row["ispublic"]);
                model.TagType = Convert.ToInt32(row["tagtype"]);
            }

            return model;
        }
 public static void Insert(TagModel tag)
 {
     TagDataAccess.Insert(tag);
 }
 public static void Update(TagModel tag)
 {
     TagDataAccess.Update(tag);
 }