public static dynamic UpdateStatus(DMCoQuan dto) { DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "DanhMuc_CoQuan", 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(DMCoQuan dto) { DataTable tabl = ConnectDb.ExecuteDataTableTask(Startup.ConnectionString, "DanhMuc_CoQuan", new string[] { "@flag", "@Title", "@Code", "@Id", "@Description", "@Status", "@IdLayout", "@Title_1", "@Title_2", "@Title_3", "@CreatedBy", "@ModifiedBy", "@CategoryId", "ParentId" }, new object[] { "SaveItem", dto.Title, dto.Code, dto.Id, dto.Description, dto.Status, dto.IdLayout, dto.Title_1, dto.Title_2, dto.Title_3, dto.CreatedBy, dto.ModifiedBy, dto.CategoryId, dto.ParentId }); return((from r in tabl.AsEnumerable() select new { N = (int)(r["N"]), }).FirstOrDefault()); }