首页 > 其他 > 详细

BPM事件

时间:2018-12-01 19:27:40      阅读:174      评论:0      收藏:0      [点我收藏+]

Context context = Context.Current;
try
{       
    string query = "update  SpendApplication set dr=‘1‘ where TaskID={0}";
            query = String.Format(query,context.Task.TaskID);
            DataSourceManager.ExecuteNonQuery("BPMDATA", query);


query = "update  Spend_ct   set dr=‘1‘ where TaskID={0}";
            query = String.Format(query,context.Task.TaskID);
            DataSourceManager.ExecuteNonQuery("BPMDATA", query);
 
FlowDataTable fdt = Context.Current.FormDataSet.Tables["SpendApplication"];
   foreach (FlowDataRow row  in fdt.Rows)
    {     string lrr=row["lrr"]==null?"":row["lrr"].ToString();
            string YsDjh=row["YsDjh"]==null?"":row["YsDjh"].ToString();
            Double    APPlyAmount=row["APPlyAmount"]==null?0:Convert.ToDouble(row["APPlyAmount"].ToString());
             Double    cwfkjes=row["cwfkjes"]==null?0:Convert.ToDouble(row["cwfkjes"].ToString());
             query = "    update  BD_OutInfo    set OutAmounts=OutAmounts-{1} where  YsDjh=‘{0}‘  and   OutAmounts>={1}";
        
           if(string.IsNullOrEmpty(lrr))
               {
                  query = String.Format(query,YsDjh,APPlyAmount);
                 }
             else 
               {
                  query = String.Format(query,YsDjh,cwfkjes);
                  }         
      
            DataSourceManager.ExecuteNonQuery("BPMDATA", query);
      }
  

 
}
catch(Exception e)

{

throw e;
}

BPM事件

原文:https://www.cnblogs.com/passerlee/p/10050309.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!