有没GGMM碰到过下面的情况,好奇怪哦,急啊!

tonrew 2004-08-27 10:35:32
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 ;
}
...全文
249 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
tonrew 2004-10-28
  • 打赏
  • 举报
回复
有答案了 :)
jamzh 2004-08-31
  • 打赏
  • 举报
回复
UP
ckvip 2004-08-30
  • 打赏
  • 举报
回复
up
thinkingforever 2004-08-30
  • 打赏
  • 举报
回复
执行时是不是跳过,而执行if (Msg_Info.ToLower() == "true")?
tonrew 2004-08-27
  • 打赏
  • 举报
回复
单步调试时总是不能执行到
string sOpetator = "",sCondition = "", sSortKey = "";(// 是后面加的,原程序没有注释)

//string tempsWhereValue="abcdefghijklmnopqrstuvwxyz";
//sOpetator = sWhereValue.Substring(0,1).Trim();
//sCondition = tempsWhereValue.Substring(2,11).ToString().Trim();
if (sOpetator == "<")
{
sSortKey = "desc";
}
else
{
sSortKey = "asc";
}
此条件判断语句也不会执行,也就是说不会给sSortKey赋任何值

12,162

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 Web Services
社区管理员
  • Web Services社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧