Ejemplo n.º 1
0
        public static dynamic UpdateStatus(DocumentsCategories dto)
        {
            DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "SP_DocumentsCategories",
                                                            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());
        }
Ejemplo n.º 2
0
        public static dynamic SaveItem(DocumentsCategories dto)
        {
            if (dto.Alias == null || dto.Alias == "")
            {
                dto.Alias = API.Models.MyHelper.StringHelper.UrlFriendly(dto.Title);
            }
            DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "SP_DocumentsCategories",
                                                            new string[] { "@flag", "@Id", "@Title", "@Alias", "@Description", "@Status", "@CreatedBy", "@ModifiedBy" },
                                                            new object[] { "SaveItem", dto.Id, dto.Title, dto.Alias, dto.Description, dto.Status, dto.CreatedBy, dto.ModifiedBy });

            return((from r in tabl.AsEnumerable()
                    select new
            {
                N = (int)(r["N"]),
            }).FirstOrDefault());
        }