App_Handler/CtrlMicroForm.ashx

(开头部分) 11KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<%@ WebHandler Language="C#" Class="CtrlMicroForm" %>

using System;
using System.Web;
using System.Data;
using MicroFormHelper;
using MicroDTHelper;
using MicroUserHelper;
using MicroPublicHelper;
using MicroWorkFlowHelper;
using Newtonsoft.Json.Linq;
using MicroAuthHelper;
using MicroNoticeHelper;
using MicroPrivateHelper;

public class CtrlMicroForm : IHttpHandler, System.Web.SessionState.IRequiresSessionState
{

    public void ProcessRequest(HttpContext context)
    {
        context.Response.ContentType = "text/plain";
        MicroAuth.CheckLogin();

        string flag = MicroPublic.GetMsg("SaveURLError");

        string Action = context.Server.UrlDecode(context.Request.Form["action"]);
        string ShortTableName = context.Server.UrlDecode(context.Request.Form["stn"]);
        string ModuleID = context.Server.UrlDecode(context.Request.Form["mid"]);
        string FormID = context.Server.UrlDecode(context.Request.Form["formid"]);
        string IsApprovalForm = context.Server.UrlDecode(context.Request.Form["isapprovalform"]);
        //string PrimaryKeyValue = context.Server.UrlDecode(context.Request.Form["pkv"]);
        string FormFields = context.Server.UrlDecode(context.Request.Form["fields"]);

        IsApprovalForm = string.IsNullOrEmpty(IsApprovalForm) == true ? "False" : IsApprovalForm;
        FormID = IsApprovalForm.toBoolean() == false ? "0" : FormID;

        if (!string.IsNullOrEmpty(Action) && !string.IsNullOrEmpty(ShortTableName) && !string.IsNullOrEmpty(ModuleID) && !string.IsNullOrEmpty(FormID) && !string.IsNullOrEmpty(IsApprovalForm) && !string.IsNullOrEmpty(FormFields))
        {
            if (Action == "add")
            {
                //在提交表单前执行私有方法
                flag = MicroPrivate.SubmitFormBeforeExecutePrivate(Action, ShortTableName, ModuleID, FormID, IsApprovalForm.toBoolean(), FormFields);

                if (flag.Substring(0, 4).toBoolean())
                {
                    flag = MicroForm.SetSubmitForm(Action, ShortTableName, ModuleID, FormID, IsApprovalForm.toBoolean(), FormFields);

                    //******提交后执行私有方法Start******
                    //暂时对休假申请执行,详细内容请看方法SubmitFormAfterExecutePrivate
                    if (flag.Length > 4)
                    {
                        //在提交表单成功后执行私有方法(判断flag前4位是否等于True)
                        if (flag.Substring(0, 4).toBoolean())
                            MicroPrivate.SubmitFormAfterExecutePrivate(Action, ShortTableName, ModuleID, FormID, IsApprovalForm.toBoolean(), FormFields);
                    }
                    //******提交后执行私有方法End******
                }

            }

后面还有 133 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。