CodePudding user response:
You say the birds no codeCodePudding user response:
The Public Function Get_ApplyList_RGCB (ByVal iyear As String, ByVal cdepcodes As String, ByVal cfeetypecode As String) As DataTableDim STRSQL As New StringBuilder
STRSQL. Append (" select ")
STRSQL. Append (" ta cfeeitemcodefirst, ta. Cfeeitemnamefirst ta.621 cfeeitemcodesecond, ta.621 cfeeitemnamesecond, ta.621 cfeeitemcodethird, ta.621 cfeeitemnamethird, ")
STRSQL. Append (" sum (case when ta. Imonth=1 then ta. Itotalapply else 0 end) as named ")
STRSQL. Append (" sum (case when ta. Then ta imonth=2. Itotalapply else 0 end) as February, ")
STRSQL. Append (" sum (case when ta. Imonth=3 then ta. Itotalapply else 0 end) as March, ")
STRSQL. Append (" sum (case when ta. Imonth=4 then ta.621 itotalapply else 0 end) as research), ")
STRSQL. Append (" sum (case when ta. Imonth=5 then ta. Itotalapply else 0 end) as May, ")
STRSQL. Append (" sum (case when ta.621 imonth=6 then ta.621 itotalapply else 0 end) as June, ")
STRSQL. Append (" sum (case when ta. Imonth=7 then ta.621 itotalapply else 0 end) as out, ")
STRSQL. Append (" sum (case when ta. Imonth=8 then ta.621 itotalapply else 0 end) as August, ")
STRSQL. Append (" sum (case when ta. Imonth=9 then ta. Itotalapply else 0 end) as September, ")
STRSQL. Append (" sum (case when ta.621 imonth=10. Then ta itotalapply else 0 end) as October, ")
STRSQL. Append (" sum (case when ta. Then ta imonth=11. Itotalapply else 0 end) as November, ")
STRSQL. Append (" sum (case when ta. Imonth=12 then ta. Itotalapply else 0 end) as another awarding, ")
STRSQL. Append (" sum (ta) itotalapply) as itotalapply ")
STRSQL. Append (" from T_APPLY_RGCB ta ")
STRSQL. Append (" where ta.621 iyear='" & amp; Iyear. Trim & amp; "'")
STRSQL. Append (" and ta cdepcode in (select cdepcode from v_department where cdeptype='budget subjects' connect by the prior cdepcode=cdepclasscode start with cdepcode in (' "& amp; Cdepcodes. Trim & amp; "'))")
STRSQL. Append (" and ta cfeeitemcode in (select cfeeitemcode from v_feeitems where blast='Y' connect by the prior cfeeitemcode=cupfeeitemcode start with cfeeitemcode in (select cfeeitemcode from t_fee_config where cfeetypecode='" & amp; Cfeetypecode. Trim & amp; "'))")
STRSQL. Append (" group by ta cfeeitemcodefirst, ta. Cfeeitemnamefirst ta.621 cfeeitemcodesecond, ta.621 cfeeitemnamesecond, ta.621 cfeeitemcodethird, ta.621 cfeeitemnamethird ")
STRSQL. Append (" order by ta cfeeitemcodefirst, ta. Cfeeitemnamefirst ta.621 cfeeitemcodesecond, ta.621 cfeeitemnamesecond, ta.621 cfeeitemcodethird, ta.621 cfeeitemnamethird ")
Return DbHelperSQL. Query (STRSQL. ToString). Tables (0)
End the Function
CodePudding user response:
Here "cdepcodes" parameters are encoded multiple departments, need to use single quotes around each processing,HidDepCode. Value=https://bbs.csdn.net/topics/hidDepCode.Value.Trim.Replace (", ", "', '")
Dim As DataTable dt=the BLL. Get_ApplyList_RGCB (ddl_year. SelectedValue, hidDepCode. Value, ddl_feetype SelectedValue)
CodePudding user response:
Put one MAO dataadapters didn't appear, code!