有没GGMM碰到过下面的情况,好奇怪哦,急啊!
public System.Data.DataSet F_GetAccountData(string S_Accountid ,string S_Date ,string S_Payid,int PageIndex,int gs_RecordNum,int RecordCount,string sWhereValue,out string Msg_Info)
{
Msg_Info = "" ;
System.Data.DataSet Ds_Data = null ;
string Ls_Manner = F_GetLbmanner(S_Accountid,out Msg_Info) ;
//string sOpetator = "",sCondition = "", sSortKey = "";
if (Msg_Info.ToLower() == "true")
{
string Ls_SqlCommand = "" ;
if ( sWhereValue.Length > 0 )
{
//string tempsWhereValue="abcdefghijklmnopqrstuvwxyz";
//sOpetator = sWhereValue.Substring(0,1).Trim();
//sCondition = tempsWhereValue.Substring(2,11).ToString().Trim();
if (sOpetator == "<")
{
sSortKey = "desc";
}
else
{
sSortKey = "asc";
}
}
if (Ls_Manner.Trim() != "*" & Ls_Manner.Trim() != "")
{
Ls_SqlCommand = " select TOP "+gs_RecordNum+" 企业编码,企业名称,帐套编号,员工编号,员工姓名,身份证号码,发放月份,发放序号,开户银行,银行帐号,核算日期,"
+ "核算人,核算审批日期,核算审批人,发放审批日期,发放审批人,发放状态,法定扣除费用,速算扣除,上月累计未发,本月实发,"
+ Ls_Manner + ",b.Uinsurancetype as 保险类别,c.Uinflag as 缴保险标志,b.Uindate as 投保日期 from ((" + S_Accountid + " as a Left outer join employee as b on 员工编号 = b.Uemployeeid) left outer join etobinfo as c on 员工编号 = c.Uemployeeid and c.Uaccountid = '" + S_Accountid + "')"
+ " where 发放月份 = '" + S_Date + "' and b.Ulbdate <= '" + S_Date + "'" ;
//if (S_Payid.Trim() != "")
Ls_SqlCommand += " and 发放序号 = '" + S_Payid + "'" + " order by 员工姓名 ";
}
else
{
Ls_SqlCommand = " select TOP "+gs_RecordNum+" a.*,b.Uinsurancetype as 保险类别,c.Uinflag as 缴保险标志,b.Uindate as 投保日期 from ((" + S_Accountid + " as a Left outer join employee as b on a.员工编号 = b.Uemployeeid) left outer join etobinfo as c on a.员工编号 = c.Uemployeeid) "
+ " where a.发放月份 = '" + S_Date + "' and b.Ulbdate <= '"+ S_Date + "'" ;
//if (S_Payid.Trim() != "")
Ls_SqlCommand += " and 发放序号 = '" + S_Payid + "'" + " order by 员工姓名 ";
}
//调用数据层查找数据
C_DBProcess c_DBProcess = new C_DBProcess() ;
Ds_Data = c_DBProcess.F_DBSearch(Ls_SqlCommand , S_Accountid , out Msg_Info) ;
}
return Ds_Data ;
}