protected void btnTest_Click(object sender, EventArgs e) { FBCommonService s = new FBCommonService(); QueryExpression qe = new QueryExpression() { QueryType = typeof(T_FB_COMPANYBUDGETAPPLYMASTER).Name }; var data = s.QueryFBEntities(qe); this.GridView1.DataSource = data; DataBind(); }
protected void btnDeptDetail_Click(object sender, EventArgs e) { // 预算月份 //DateTime dtBudgetDate = DateTime.Parse(); //string dataValue = dtBudgetDate.ToString("yyyy-MM-dd"); QueryExpression qeMonth = QueryExpression.Equal("BUDGETARYMONTH", this.txtMonth.Text); qeMonth.QueryType = typeof(T_FB_DEPTBUDGETAPPLYDETAIL).Name; // 预算部门 QueryExpression qeDept = QueryExpression.Equal("OWNERDEPARTMENTID", this.txtDeptID.Text); qeDept.QueryType = typeof(T_FB_DEPTBUDGETAPPLYDETAIL).Name; qeDept.RelatedExpression = qeMonth; FBCommonService fbService = new FBCommonService(); var resultList = fbService.QueryFBEntities(qeDept); this.GridView1.DataSource = resultList.ToEntityList<T_FB_DEPTBUDGETAPPLYDETAIL>(); DataBind(); }
protected void btnDeptDetail_Click(object sender, EventArgs e) { // 预算月份 //DateTime dtBudgetDate = DateTime.Parse(); //string dataValue = dtBudgetDate.ToString("yyyy-MM-dd"); QueryExpression qeMonth = QueryExpression.Equal("BUDGETARYMONTH", this.txtMonth.Text); qeMonth.QueryType = typeof(T_FB_DEPTBUDGETAPPLYDETAIL).Name; // 预算部门 QueryExpression qeDept = QueryExpression.Equal("OWNERDEPARTMENTID", this.txtDeptID.Text); qeDept.QueryType = typeof(T_FB_DEPTBUDGETAPPLYDETAIL).Name; qeDept.RelatedExpression = qeMonth; FBCommonService fbService = new FBCommonService(); var resultList = fbService.QueryFBEntities(qeDept); this.GridView1.DataSource = resultList.ToEntityList <T_FB_DEPTBUDGETAPPLYDETAIL>(); DataBind(); }