from j in system.jhzd where j.dwbm.ToString().Trim() == branchcode.ToString().Trim() && Convert.ToDateTime(j.yearmonth.ToString().Trim()).CompareTo(Convert.ToDateTime(timeFrom)) >= 0 && Convert.ToDateTime(j.yearmonth.ToString().Trim()).CompareTo(Convert.ToDateTime(timeTo)) <= 0 join b in system.t_sys_Branch on j.dwbm.ToString().Trim() equals b.BranchCode join c in system.T_CWLB on j.xmlb.ToString().Trim() equals c.ID select new { BranchName = b.BranchName, category = c.CWMC, money = j.je, comefrom = j.zjly, time = j.yearmonth, zhaiyao = j.zhaiyao, }