码迷,mamicode.com
首页 > 其他好文 > 详细

BPM事件

时间:2018-12-01 20:08:57      阅读:296      评论:0      收藏:0      [点我收藏+]

标签:row   except   pmd   catch   set   form   contex   .exe   for   

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事件

标签:row   except   pmd   catch   set   form   contex   .exe   for   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!