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