zoukankan      html  css  js  c++  java
  • extjs 前端js代码调用后台函数方法

    前端javascript代码部分:
    Ext.Ajax.request(
    {
    url: '/Process/SuspendWorkFlow',   //配置的后台函数路由
    params: { wfInsId: wf.WFInstanceID, status: cmd }, //对应函数的参数
    success: function () {
    LaunchedWFGrid.store.reload();
    Ext.Msg.show({ title: "提示", msg: successMsg, buttons: Ext.Msg.OK, icon: Ext.MessageBox.INFO });
    },
    failure: function () {
    Ext.Msg.show({ title: "提示", msg: failureMsg, buttons: Ext.Msg.OK, icon: Ext.MessageBox.ERROR });
    }
    }
    );

    //后台函数

    public AjaxResult SuspendWorkFlow(string wfInsId, string status)
    {
    AjaxResult result = new AjaxResult();
    try
    {
    bool flag = false;
    switch (status)
    {
    case "Suspend":
    flag = this.BPM.UpdateWFInstanceStatus(wfInsId, EnumWFStatus.暂停);
    break;
    case "ReRun":
    flag = this.BPM.UpdateWFInstanceStatus(wfInsId, EnumWFStatus.等待);
    break;
    case "Cancel":
    flag = this.BPM.UpdateWFInstanceStatus(wfInsId, EnumWFStatus.取消);
    break;
    }
    result.Result = flag;
    }
    catch (Exception e)
    {
    result.ErrorMessage = e.ToString();
    }
    return result;
    }

  • 相关阅读:
    jq 自定义动画案例
    jq 左右轮播图案例
    hdu-5728 PowMod(数论)
    UVA-11892(组合游戏)
    UVA-12293(组合游戏)
    LA-5059(组合游戏)
    hdu-5724 Chess(组合游戏)
    hdu-5750 Dertouzos(数论)
    hdu-5748 Bellovin(LIS)
    hdu-5747 Aaronson(水题)
  • 原文地址:https://www.cnblogs.com/rpoplar/p/2566422.html
Copyright © 2011-2022 走看看