日期:2014-05-17  浏览次数:20775 次

调试时可以正常保存,不进断点数据没有正常保存。请大牛们帮忙看看。添加Thread.Sleep(100)后可正常执行
本帖最后由 wwwaone 于 2013-02-18 14:16:19 编辑
public string saveFundTableToOrderMoveInfo()
    {
        int countOk = 0, countNo = 0;
        string[] tempstr = str.Split('|');
        for (int i = 0; i < tempstr.Length - 1; i++)
        {
            //Thread.Sleep(100);
            string[] arrystr = tempstr[i].ToString().Split(',');
            int flag = stockBLL.orderMoveSave(ordersheetno, arrystr[0].ToString(), movesheetno, arrystr[1].ToString(), arrystr[2].ToString(), arrystr[3].ToString(), adduser, addDate, storageId, arrystr[4].ToString());

            if (flag == 0)
            {
                countOk = countOk + 1;
            }
            else
            {
                countNo = countNo + 1;
            }
        }

        try
        {
            DataTable dt = ExecuteCmd("*", "tb_yc_fund_table", "where sheetno='" + ordersheetno + "' and del_flag=0 and quehuo_flag=0 order by fund_id").Tables[0];
            if (dt.Rows.Count > 0)
            {
                ordermove.sheetno = movesheetno;
                ordermove.moveout_departId = Int32.Parse(departId);
                ordermove.moveout_storageId = Int32.Parse(storageId);
                ordermove.moveout_date = DateTime.Parse(addDate);
                ordermove.moveout_user = adduser;
                ordermove.movein_departId = Int32.Parse(indepartId);
                ordermove.movein_storageId = Int32.Parse(instorageId);
                for (int i =