public static dynamic UpdateStatus(CategoriesArticles dto) { DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "SP_CategoriesArticles", new string[] { "@flag", "@Id", "@Status", "@ModifiedBy" }, new object[] { "UpdateStatus", dto.Id, dto.Status, dto.ModifiedBy }); return((from r in tabl.AsEnumerable() select new { N = (int)(r["N"]), }).FirstOrDefault()); }
public static dynamic SaveItem(CategoriesArticles dto) { if (dto.Alias == null || dto.Alias == "") { dto.Alias = API.Models.MyHelper.StringHelper.UrlFriendly(dto.Title); } DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "SP_CategoriesArticles", new string[] { "@flag", "@Id", "@Title", "@Alias", "@Description", "@ParentId", "@Status", "@Deleted", "@CreatedBy", "@ModifiedBy", "@Metadesc", "@Metakey", "@Metadata", "@Images", "@Params", "@Ordering", "@Hits", "@FeaturedHome" }, new object[] { "SaveItem", dto.Id, dto.Title, dto.Alias, dto.Description, dto.ParentId, dto.Status, dto.Deleted, dto.CreatedBy, dto.ModifiedBy, dto.Metadesc, dto.Metakey, dto.Metadata, dto.Images, dto.Params, dto.Ordering, dto.Hits, dto.FeaturedHome }); return((from r in tabl.AsEnumerable() select new { N = (int)(r["N"]), }).FirstOrDefault()); }