Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request["delID"] != null)
        {
            DelLab(Request["delID"]);
        }
        CHECKTYPEREQ vrParameter = new CHECKTYPEREQ();

        vrParameter.dwMainKind = (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_SERVICE;
        CHECKTYPE[] vrResult;

        if (m_Request.Admin.CheckTypeGet(vrParameter, out vrResult) == REQUESTCODE.EXECUTE_SUCCESS)
        {
            UpdatePageCtrl(m_Request.Admin);
            for (int i = 0; i < vrResult.Length; i++)
            {
                string szMnagroup = "0";

                m_szOut += "<tr>";
                m_szOut += "<td data-manGroupID=\"" + szMnagroup + "\" data-id=\"" + vrResult[i].dwCheckKind.ToString() + "\">" + vrResult[i].szCheckName + "</td>";
                // m_szOut += "<td>" + GetJustNameEqual(vrResult[i].dwCheckLevel, "Admin_Level") + "</td>";
                //  m_szOut += "<td>" + GetJustNameEqual(vrResult[i].dwCheckLevel, "CheckType_Property") + "</td>";
                m_szOut += "<td>" + (vrResult[i].szDeptName) + "</td>";
                m_szOut += "<td><div class='OPTD'></div></td>";
                m_szOut += "</tr>";
            }
        }
        PutBackValue();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string szOP = "新建";

        if (Request["op"] == "set")
        {
            szOP = "修改";
        }
        CHECKTYPE newCheckType;

        if (IsPostBack)
        {
            GetHTTPObj(out newCheckType);
            if (m_Request.Admin.CheckTypeSet(newCheckType) != REQUESTCODE.EXECUTE_SUCCESS)
            {
                MessageBox(m_Request.szErrMessage, szOP + "服务失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE);
            }
            else
            {
                MessageBox(szOP + "服务成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK);
                return;
            }
        }
        m_szCheckTypeKind     = GetInputHtmlFromXml(0, CONSTHTML.option, "", "CheckType_Kind", true);
        m_szCheckYardTypeKind = GetInputHtmlFromXml(0, CONSTHTML.option, "", "CheckTypeYard_Kind", true);
        m_Property            = GetInputHtmlFromXml(0, CONSTHTML.radioButton, "dwProperty", "CheckType_Property", true);
        m_level = GetInputHtmlFromXml(0, CONSTHTML.option, "", "Yard_ActivityLevel", true);
        if (Request["op"] == "set")
        {
            bSet = true;

            CHECKTYPEREQ vrGet = new CHECKTYPEREQ();
            vrGet.dwCheckKind = Parse(Request["dwID"]);
            CHECKTYPE[] vtRes;
            if (m_Request.Admin.CheckTypeGet(vrGet, out vtRes) != REQUESTCODE.EXECUTE_SUCCESS)
            {
                MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL);
            }
            else
            {
                if (vtRes.Length == 0)
                {
                    MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL);
                }
                else
                {
                    PutJSObj(vtRes[0]);
                    m_Title = "修改【" + vtRes[0].szCheckName + "】";
                }
            }
        }
        else
        {
            m_Title = "新建服务";
        }
    }
Exemple #3
0
    private bool GetCheckType(uint uID, out CHECKTYPE setValue)
    {
        setValue = new CHECKTYPE();
        CHECKTYPEREQ vrGet = new CHECKTYPEREQ();

        vrGet.dwCheckKind = uID;
        CHECKTYPE[] vtCheck;
        if (m_Request.Admin.CheckTypeGet(vrGet, out vtCheck) == REQUESTCODE.EXECUTE_SUCCESS && vtCheck != null && vtCheck.Length > 0)
        {
            setValue = vtCheck[0];
            return(true);
        }
        return(false);
    }
Exemple #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        UNICAMPUS[] vtCamp = GetAllCampus();
        szCamp += GetInputItemHtml(CONSTHTML.option, "", "全部", "0");
        if (vtCamp != null && vtCamp.Length > 0)
        {
            for (int i = 0; i < vtCamp.Length; i++)
            {
                szCamp += GetInputItemHtml(CONSTHTML.option, "", vtCamp[i].szCampusName, vtCamp[i].dwCampusID.ToString());
            }
        }
        UNIDEVCLS[] vtKind = GetAllDevCls();
        szKinds += GetInputItemHtml(CONSTHTML.option, "", "全部", "0");
        for (int i = 0; vtKind != null && i < vtKind.Length; i++)
        {
            szKinds += GetInputItemHtml(CONSTHTML.option, "", vtKind[i].szClassName.ToString(), vtKind[i].dwClassID.ToString());
        }
        UNIBUILDING[] vtBuilding = getAllBuilding();
        szBuilding += GetInputItemHtml(CONSTHTML.option, "", "全部", "0");
        for (int i = 0; i < vtBuilding.Length; i++)
        {
            if (vtBuilding[i].dwCampusID.ToString() == vtCamp[0].dwCampusID.ToString())
            {
                szBuilding += GetInputItemHtml(CONSTHTML.option, "", vtBuilding[i].szBuildingName.ToString(), vtBuilding[i].dwBuildingID.ToString());
            }
        }
        CODINGTABLE[] vtCodeing = getCodeTableByType((uint)CODINGTABLE.DWCODETYPE.CODE_YARDRESVKIND);
        for (int i = 0; vtCodeing != null && i < vtCodeing.Length; i++)
        {
            szYardKind += GetInputItemHtml(CONSTHTML.radioButton, "dwKind", vtCodeing[i].szCodeName, vtCodeing[i].szCodeSN);
        }
        UNILAB newLab;

        if (IsPostBack)
        {
            REQUESTCODE uResponse     = REQUESTCODE.EXECUTE_FAIL;
            string      szCheckIDs    = Request["ID"];
            string[]    szCheckIDList = szCheckIDs.Split(',');
            for (int i = 0; i < szCheckIDList.Length; i++)
            {
                uint uTempID = Parse(szCheckIDList[i]);
                if (uTempID == 0)
                {
                    continue;;
                }

                YARDRESVCHECKINFOREQ vrPar = new YARDRESVCHECKINFOREQ();
                vrPar.dwCheckID      = uTempID;
                vrPar.dwNeedYardResv = 1;

                YARDRESVCHECKINFO[] vtRes;

                uResponse = m_Request.Reserve.GetYardResvCheckInfo(vrPar, out vtRes);
                if (uResponse == REQUESTCODE.EXECUTE_SUCCESS == vtRes.Length > 0)
                {
                    if (i > 0)
                    {
                        CHECKTYPE checktype = new CHECKTYPE();
                        if (GetCheckType((uint)vtRes[0].dwCheckKind, out checktype))
                        {
                            if ((checktype.dwMainKind & (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_SERVICE) > 0)
                            {
                                continue;
                            }
                        }
                        else
                        {
                            continue;
                        }
                    }
                    uResponse = CheckAll(vtRes);
                }
            }
            if (uResponse == REQUESTCODE.EXECUTE_SUCCESS)
            {
                MessageBox("审核通过", "", MSGBOX.SUCCESS, MSGBOX_ACTION.OK);
            }
            else
            {
                MessageBox(m_Request.szErrMessage, "审核失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL);
            }
        }

        if (Request["op"] == "set")
        {
            bSet = true;
            REQUESTCODE          uResponse = REQUESTCODE.EXECUTE_FAIL;
            YARDRESVCHECKINFOREQ vrPar     = new YARDRESVCHECKINFOREQ();
            string szCheckIDs = Request["ID"];
            PutMemberValue("ID", szCheckIDs);
            string[] szCheckIDList = szCheckIDs.Split(',');

            vrPar.dwCheckID = Parse(szCheckIDList[0]);

            vrPar.dwNeedYardResv = 1;
            string szCheckURl = Request["checkstate"];
            if (szCheckURl != null && szCheckURl != "")
            {
                PutMemberValue("szCheckURl", szCheckURl);
            }
            YARDRESVCHECKINFO[] vtRes;
            uResponse = m_Request.Reserve.GetYardResvCheckInfo(vrPar, out vtRes);
            if (uResponse != REQUESTCODE.EXECUTE_SUCCESS)
            {
                MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL);
            }
            else if (vtRes.Length > 0 && vtRes[0].YardResv.dwActivitySN != null)
            {
                YARDRESV yardResv = vtRes[0].YardResv;
                szMemoYardResv = vtRes[0].YardResv.szMemo;
                uint uResvPro = (uint)yardResv.dwProperty;
                if ((uResvPro & (uint)UNIRESERVE.DWPROPERTY.RESVPROP_PROFIT) > 0)
                {
                    PutMemberValue("resvPro1", "1");
                }
                else
                {
                    PutMemberValue("resvPro1", "2");
                }
                if ((uResvPro & (uint)UNIRESERVE.DWPROPERTY.RESVPROP_UNOPEN) > 0)
                {
                    PutMemberValue("resvPro2", "1");
                }
                else
                {
                    PutMemberValue("resvPro2", "2");
                }
                PutMemberValue("YardActivitySN", yardResv.dwActivitySN.ToString());
                PutMemberValue("dwKind", yardResv.dwKind.ToString());
                if (vtRes[0].YardResv.szCycRule == "")
                {
                    yardResv.szCycRule = Get1970Date(yardResv.dwBeginTime) + "至" + Get1970Date(yardResv.dwEndTime) + ";";
                }
                PutHTTPObj(yardResv);
                if (vtRes.Length == 0)
                {
                    MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL);
                }
                else if (vtRes.Length > 0)
                {
                    YARDRESVCHECKINFOREQ vrParCheck = new YARDRESVCHECKINFOREQ();
                    vrParCheck.dwResvID  = vtRes[0].dwResvID;
                    vrPar.dwNeedYardResv = 1;
                    YARDRESVCHECKINFO[] vtResCheck;
                    uResponse = m_Request.Reserve.GetYardResvCheckInfo(vrParCheck, out vtResCheck);
                    if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtResCheck.Length > 0)
                    {
                        szPreCheckDetail += "<table>";
                        for (int m = 0; m < vtResCheck.Length; m++)
                        {
                            if ((vtResCheck[m].dwCheckStat & ((uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_OK)) > 0)
                            {
                                UNIDEPT dept;
                                string  szDept = "";
                                szPreCheckDetail += "<tr>";
                                if (GetDeptByID(vtResCheck[m].dwCheckDeptID.ToString(), out dept))
                                {
                                    szDept = dept.szName.ToString();
                                }
                                szPreCheckDetail += "<td>" + szDept + "</td>";
                                szPreCheckDetail += "<td>" + Get1970Date(vtResCheck[m].dwCheckTime) + "</td>";
                                szPreCheckDetail += "<td>" + vtResCheck[m].szCheckDetail + "</td>";
                                szPreCheckDetail += "</tr>";
                            }
                        }
                        szPreCheckDetail += "</table>";
                    }
                    CHECKTYPEREQ vrGetcheckTypeTemp = new CHECKTYPEREQ();
                    vrGetcheckTypeTemp.dwCheckKind = vtRes[0].dwCheckKind;
                    CHECKTYPE[] vtCheckTypeTemp;
                    if (m_Request.Admin.CheckTypeGet(vrGetcheckTypeTemp, out vtCheckTypeTemp) == REQUESTCODE.EXECUTE_SUCCESS && vtCheckTypeTemp != null && vtCheckTypeTemp.Length > 0)
                    {
                        ArrayList listDev     = new ArrayList();
                        string[]  szDevIDList = (vtRes[0].YardResv.dwDevID.ToString() + "," + vtRes[0].YardResv.szSpareDevIDs).Split(',');
                        for (int k = 0; k < szDevIDList.Length && szDevIDList[k] != ""; k++)
                        {
                            DEVREQ vrGetDev = new DEVREQ();
                            vrGetDev.dwDevID = Parse(szDevIDList[k]);
                            UNIDEVICE[] vtDev;
                            uResponse = m_Request.Device.Get(vrGetDev, out vtDev);
                            if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtDev != null && vtDev.Length > 0)
                            {
                                listDev.Add(vtDev[0]);
                            }
                        }
                        if ((((uint)vtCheckTypeTemp[0].dwMainKind) & ((uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_DEVMAN)) > 0)
                        {
                            if (listDev.Count > 0)
                            {
                                for (int i = 0; i < listDev.Count; i++)
                                {
                                    UNIDEVICE objDev = (UNIDEVICE)listDev[i];
                                    szDevList += GetInputItemHtml(CONSTHTML.option, "", objDev.szDevName.ToString(), objDev.dwDevID.ToString());
                                }
                                szIsCheck = "true";
                                PutMemberValue("devID", vtRes[0].YardResv.dwDevID.ToString());
                            }
                        }
                    }
                }
                szResvDevName  = vtRes[0].YardResv.szDevName;
                szResvDevDept  = vtRes[0].YardResv.szDeptName;
                szApplyName    = vtRes[0].szApplicantName;
                szActivity     = vtRes[0].YardResv.szActivityName;
                szPeople       = vtRes[0].YardResv.dwMinAttendance.ToString() + "-" + vtRes[0].YardResv.dwMaxAttendance.ToString() + "人";
                szOrganiger    = vtRes[0].YardResv.szOrganization;
                szOrganization = vtRes[0].YardResv.szOrganization;
                PutMemberValue("dwCheckID", vtRes[0].dwCheckID.ToString());
                szPreDate   = vtRes[0].YardResv.dwPreDate.ToString();
                szResvBegin = Get1970Date(vtRes[0].YardResv.dwBeginTime, "HHmm");
                szResvEnd   = Get1970Date(vtRes[0].YardResv.dwEndTime, "HHmm");


                szLeveal        = GetJustNameEqual(vtRes[0].YardResv.dwActivityLevel, "Yard_ActivityLevel");
                szSecurityLevel = GetJustNameEqual(vtRes[0].YardResv.dwSecurityLevel, "Yard_dwSecurityLevel");
                szDirectors     = GetJustNameEqual(vtRes[0].YardResv.dwCheckKinds, "Yard_dwDirectors");


                uint         uCheckKinds    = (uint)vtRes[0].YardResv.dwCheckKinds;
                CHECKTYPEREQ vrCheckTypeReq = new CHECKTYPEREQ();
                vrCheckTypeReq.dwMainKind = (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_SERVICE;
                CHECKTYPE[] vtCheckType;
                if (m_Request.Admin.CheckTypeGet(vrCheckTypeReq, out vtCheckType) == REQUESTCODE.EXECUTE_SUCCESS && vtCheckType != null && vtCheckType.Length > 0)
                {
                    for (int m = 0; m < vtCheckType.Length; m++)
                    {
                        if ((uCheckKinds & (uint)vtCheckType[m].dwCheckKind) > 0)
                        {
                            szServiceType += vtCheckType[m].szCheckName + ",";
                        }
                    }
                }
                if ((vtRes[0].YardResv.dwProperty & ((uint)UNIRESERVE.DWPROPERTY.RESVPROP_NEEDVIDEO)) > 0)
                {
                    szNeedCameor = "需要";
                }
                UNIACCOUNT accno;
                if (GetAccByAccno(vtRes[0].dwApplicantID.ToString(), out accno))
                {
                    accno.szTrueName = accno.szTrueName + "(" + accno.szLogonName + ")";
                    PutMemberValue("szTrueName", accno.szTrueName);
                    szMemo = vtRes[0].YardResv.szMemo;

                    string[] szMemoList = szMemo.Split('$');
                    if (szMemoList != null && szMemoList.Length > 0)
                    {
                        szMemo    = szMemoList[0];
                        szMemoExt = szMemoList[0].Replace("&", ",");
                    }
                }
                szResvTime = vtRes[0].YardResv.szCycRule;
                if (szResvTime == "")
                {
                    szResvTime = Get1970Date(vtRes[0].YardResv.dwBeginTime) + "至" + Get1970Date(vtRes[0].YardResv.dwEndTime) + ";";
                }
                if (vtRes[0].YardResv.szApplicationURL != null && vtRes[0].YardResv.szApplicationURL != "")
                {
                    PutMemberValue("szApplicationURL", vtRes[0].YardResv.szApplicationURL);
                }
                m_Title = "审核";
            }
        }
        else
        {
            m_Title = "审核";
        }
    }
Exemple #5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        YARDACTIVITY newYardActivity;
        string       szOp = "新建";

        if (Request["op"] == "set")
        {
            szOp = "修改";
        }
        UNICAMPUS[] vtCamp = GetAllCampus();
        if (vtCamp != null && vtCamp.Length > 0)
        {
            for (int i = 0; i < vtCamp.Length; i++)
            {
                szCamp += GetInputItemHtml(CONSTHTML.option, "", vtCamp[i].szCampusName, vtCamp[i].dwCampusID.ToString());
            }
        }
        szSiteAppleModel = GetInputHtmlFromXml(0, CONSTHTML.option, "", "YardResvModule", true);
        UNIBUILDING[] vtBuilding = getAllBuilding();
        for (int i = 0; i < vtBuilding.Length; i++)
        {
            if (vtBuilding[i].dwCampusID.ToString() == vtCamp[0].dwCampusID.ToString())
            {
                szBuilding += GetInputItemHtml(CONSTHTML.option, "", vtBuilding[i].szBuildingName.ToString(), vtBuilding[i].dwBuildingID.ToString());
            }
        }
        if (IsPostBack)
        {
            newYardActivity.szActivityName = Request["szActivityName"];
            string szkindsTemp = Request["kindsTemp"];
            GetHTTPObj(out newYardActivity);

            /* newYardActivity.szUsableKindIDs = Request["szUsableKindIDs"];
             * string[] szDevKindList = newYardActivity.szUsableKindIDs.Split(',');
             * string szDevKindName = "";
             * for (int i = 0; i < szDevKindList.Length; i++)
             * {
             *   UNIDEVKIND devKindGet;
             *   if (GetDevKindByID(szDevKindList[i], out devKindGet))
             *   {
             *       szDevKindName += devKindGet.szKindName + ",";
             *   }
             *
             * }
             * */
            string szCheckType  = (Request["checktype"]);
            string szCheckType2 = (Request["checktype2"]);
            uint   uCheckType   = CharListToUint(szCheckType) + CharListToUint(szCheckType2);
            //    newYardActivity.szUsableDevKindNames = szDevKindName;

            string[] szCheckTypeList = new string[0];// newYardActivity.szUsableKindIDs.Split(',');
            string   szCheckTypeName = "";
            for (int i = 0; i < szCheckTypeList.Length; i++)
            {
                CHECKTYPEREQ vrCheckTypeTemp = new CHECKTYPEREQ();
                vrCheckTypeTemp.dwCheckKind = Parse(szCheckTypeList[i]);
                CHECKTYPE[] vtChecktypeTemp;

                if (m_Request.Admin.CheckTypeGet(vrCheckTypeTemp, out vtChecktypeTemp) == REQUESTCODE.EXECUTE_SUCCESS)
                {
                    szCheckTypeName += vtChecktypeTemp[0].szCheckName + ",";
                }
            }

            newYardActivity.dwCheckKinds = uCheckType;
            newYardActivity.szCheckNames = szCheckTypeName;
            string szMemo = Request["szMemo"];
            if (szMemo != null)
            {
                szMemo = szMemo.Replace(",", "&");
            }
            if (szMemo == null || szMemo == "")
            {
                szMemo = "";
            }
            newYardActivity.szMemo = szMemo;
            string[]  szkindsTempList = szkindsTemp.Split(',');
            ArrayList list            = new ArrayList();
            for (int i = 0; i < szkindsTempList.Length; i++)
            {
                string szTemp = szkindsTempList[i];
                if (szTemp != null && szTemp != "")
                {
                    list.Add(szTemp);
                }
            }
            object[]    szkindsTempListLast = (object[])list.ToArray();
            YADEVKIND[] yardkinds           = new YADEVKIND[szkindsTempListLast.Length];
            for (int i = 0; i < szkindsTempListLast.Length; i++)
            {
                yardkinds[i]              = new YADEVKIND();
                yardkinds[i].dwKindID     = Parse((string)szkindsTempListLast[i]);
                yardkinds[i].dwActivitySN = newYardActivity.dwActivitySN;
            }
            newYardActivity.UsableDevKind = yardkinds;
            if (yardkinds == null || yardkinds.Length == 0)
            {
                YADEVKIND[] yardkindsTemp = new YADEVKIND[0];
                newYardActivity.UsableDevKind = yardkindsTemp;
            }
            uint dwKindModul = Parse(Request["dwKindModul"]);
            if (newYardActivity.dwSecurityLevel == null)
            {
                newYardActivity.dwSecurityLevel = 0;
            }
            newYardActivity.dwSecurityLevel = (uint)newYardActivity.dwSecurityLevel | dwKindModul;
            if (m_Request.Reserve.SetYardActivity(newYardActivity, out newYardActivity) != REQUESTCODE.EXECUTE_SUCCESS)
            {
                MessageBox(m_Request.szErrMessage, szOp + "场景失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE);
            }
            else
            {
                MessageBox(szOp + "场景成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK);
                return;
            }
        }
        m_szYardActivityMemo = GetInputHtmlFromXml(0, CONSTHTML.checkBox, "szMemo", "YardKindMemo", true);

        /* UNIDEVKIND[] devKind = GetAllDevKind();
         * if (devKind != null)
         * {
         *
         * for (int i = 0; i < devKind.Length; i++)
         * {
         *     m_szDevKind += GetInputItemHtml(CONSTHTML.checkBox, "szUsableKindIDs", devKind[i].szKindName, devKind[i].dwKindID.ToString());
         * }
         *
         * } * */
        CHECKTYPEREQ vrCheckType = new CHECKTYPEREQ();

        vrCheckType.dwMainKind = ((uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_DEVMAN + (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_SECURITY + (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_PUBLICITY + (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_DIRECTOR);
        CHECKTYPE[] vtChecktype;

        if (m_Request.Admin.CheckTypeGet(vrCheckType, out vtChecktype) == REQUESTCODE.EXECUTE_SUCCESS)
        {
            for (int i = 0; i < vtChecktype.Length; i++)
            {
                m_szCheckType += GetInputItemHtml(CONSTHTML.checkBox, "checktype", vtChecktype[i].szCheckName.ToString(), vtChecktype[i].dwCheckKind.ToString());
            }
        }
        CHECKTYPEREQ vrCheckSerType = new CHECKTYPEREQ();

        vrCheckSerType.dwMainKind = ((uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_SERVICE);
        CHECKTYPE[] vtCheckRestype;

        if (m_Request.Admin.CheckTypeGet(vrCheckSerType, out vtCheckRestype) == REQUESTCODE.EXECUTE_SUCCESS)
        {
            for (int i = 0; i < vtCheckRestype.Length; i++)
            {
                m_szCheckSerType += GetInputItemHtml(CONSTHTML.checkBox, "checktype2", vtCheckRestype[i].szCheckName.ToString(), vtCheckRestype[i].dwCheckKind.ToString());
            }
        }

        if (Request["op"] == "set")
        {
            bSet = true;

            YARDACTIVITYREQ vrGet = new YARDACTIVITYREQ();
            vrGet.dwActivitySN = Parse(Request["dwLabID"]);
            YARDACTIVITY[] vtRes;
            if (m_Request.Reserve.GetYardActivity(vrGet, out vtRes) != REQUESTCODE.EXECUTE_SUCCESS)
            {
                MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL);
            }
            else
            {
                if (vtRes.Length == 0)
                {
                    MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL);
                }
                else
                {
                    string szMemo = vtRes[0].szMemo;
                    szMemo          = szMemo.Replace("&", ",");
                    vtRes[0].szMemo = szMemo;
                    PutJSObj(vtRes[0]);
                    PutMemberValue("checktype2", vtRes[0].dwCheckKinds.ToString());
                    PutMemberValue("checktype", vtRes[0].dwCheckKinds.ToString());
                    m_Title = "修改【" + vtRes[0].szActivityName + "】";

                    UNIDEVKIND[] vtDevKind;
                    DEVKINDREQ   vrKindGet = new DEVKINDREQ();
                    vrKindGet.dwExtRelatedID = vtRes[0].dwActivitySN;
                    if (m_Request.Device.DevKindGet(vrKindGet, out vtDevKind) == REQUESTCODE.EXECUTE_SUCCESS && vtDevKind != null && vtDevKind.Length > 0)
                    {
                        string szYardKinds = ",";
                        for (int i = 0; i < vtDevKind.Length; i++)
                        {
                            szYardKinds += vtDevKind[i].dwKindID.ToString() + ",";
                        }

                        PutMemberValue("kindsTemp", szYardKinds);
                        PutMemberValue("kinds", szYardKinds);
                    }
                    uint uSecurityLevel = (uint)vtRes[0].dwSecurityLevel;
                    if ((uSecurityLevel & (uint)268435456) > 0)//0x10000000教室借用
                    {
                        PutMemberValue("dwKindModul", "268435456");
                    }
                    else if ((uSecurityLevel & (uint)536870912) > 0)//0x20000000教室借用
                    {
                        PutMemberValue("dwKindModul", "536870912");
                    }
                    else if ((uSecurityLevel & (uint)8388608) > 0)//0x800000教室借用
                    {
                        PutMemberValue("dwKindModul", "8388608");
                    }
                }
            }
        }
        else
        {
            m_Title = szOp + "场景";
        }
    }
Exemple #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        UNIRESVRULE newResvRule;
        uint?       uMax = 0;
        uint        uID  = PRDevice.DEVICE_BASE | PRDevice.MSREQ_LAB_SET;

        if (GetMaxValue(ref uMax, uID, "dwLabID"))
        {
        }
        UNIGROUP[] groupList = GetGroupByKind((uint)UNIGROUP.DWKIND.GROUPKIND_USER);
        m_szGroup += GetInputItemHtml(CONSTHTML.option, "", "全部", "0");
        for (int i = 0; i < groupList.Length; i++)
        {
            m_szGroup += GetInputItemHtml(CONSTHTML.option, "", groupList[i].szName.ToString(), groupList[i].dwGroupID.ToString());
        }
        if (IsPostBack)
        {
            GetHTTPObj(out newResvRule);
            newResvRule.dwLatestResvTime   = 60 * newResvRule.dwLatestResvTime;
            newResvRule.dwEarliestResvTime = 60 * newResvRule.dwEarliestResvTime;
            newResvRule.dwLimit            = CharListToUint(Request["dwLimit"]);
            newResvRule.dwLimit            = ((uint)newResvRule.dwLimit);

            newResvRule.dwLimit = (uint)newResvRule.dwLimit;
            CHECKTYPEREQ checkTypeGet = new CHECKTYPEREQ();
            checkTypeGet.dwMainKind = (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_DEVMAN;
            CHECKTYPE[] vtCheckType;
            if (m_Request.Admin.CheckTypeGet(checkTypeGet, out vtCheckType) == REQUESTCODE.EXECUTE_SUCCESS && vtCheckType != null && vtCheckType.Length > 0)
            {
                newResvRule.CheckTbl = new RULECHECKINFO[1];
                newResvRule.CheckTbl[0].dwBeforeKind = 0;
                newResvRule.CheckTbl[0].dwCheckKind  = vtCheckType[0].dwCheckKind;
                newResvRule.CheckTbl[0].dwCheckLevel = vtCheckType[0].dwCheckLevel;
                newResvRule.CheckTbl[0].dwDeptID     = vtCheckType[0].dwDeptID;
                newResvRule.CheckTbl[0].dwMainKind   = vtCheckType[0].dwMainKind;
                newResvRule.CheckTbl[0].szCheckName  = vtCheckType[0].szCheckName;

                if ((newResvRule.dwLimit & 1073741824) > 0)    //需要审核0x40000000
                {
                    newResvRule.CheckTbl[0].dwProperty = (uint)RULECHECKINFO.DWPROPERTY.CHECKPROP_MAIN;
                }
                else
                {
                    newResvRule.CheckTbl[0].dwProperty = 0;    // (uint)RULECHECKINFO.DWPROPERTY.CHECKPROP_MAIN;
                }
            }

            if (uResvFor == 1)
            {
                if (((uint)newResvRule.dwLimit & ((uint)UNIRESVRULE.DWLIMIT.RESVLIMIT_DEV)) <= 0)
                {
                    newResvRule.dwLimit = (uint)newResvRule.dwLimit | (uint)UNIRESVRULE.DWLIMIT.RESVLIMIT_DEV;
                }
            }
            else if (uResvFor == 2)
            {
                if (((uint)newResvRule.dwLimit & ((uint)UNIRESVRULE.DWLIMIT.RESVLIMIT_DEVKIND)) <= 0)
                {
                    newResvRule.dwLimit = (uint)newResvRule.dwLimit;
                }
            }
            newResvRule.dwResvPurpose = CharListToUint(Request["dwResvPurpose"]);
            if (m_Request.Reserve.ResvRuleSet(newResvRule, out newResvRule) != REQUESTCODE.EXECUTE_SUCCESS)
            {
                MessageBox(m_Request.szErrMessage, "修改失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE);
            }
            else
            {
                MessageBox("修改成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK);
                return;
            }
        }

        m_szIdent       = GetAllInputHtml(CONSTHTML.option, "", "Ident");
        m_szResvPurpose = GetAllInputHtml(CONSTHTML.checkBox, "dwResvPurpose", "ResvPurpose");
        m_Limit         = GetAllInputHtml(CONSTHTML.checkBox, "dwLimit", "ResvRule_Limit");
        UNIDEVCLS[] vtDevCls = GetDevCLS(0);
        if (vtDevCls != null && vtDevCls.Length > 0)
        {
            m_szDevCLS += "<option value='" + "0" + "'>" + "全部适用" + "</option>";
            for (int i = 0; i < vtDevCls.Length; i++)
            {
                m_szDevCLS += GetInputItemHtml(CONSTHTML.option, "", vtDevCls[i].szClassName, vtDevCls[i].dwClassID.ToString());
            }
        }
        UNIDEVICE[] vtDev;
        if (GetAllDev(out vtDev) == true)
        {
            m_szDev += "<option value='" + "0" + "'>" + "全部" + "</option>";
            for (int i = 0; i < vtDev.Length; i++)
            {
                m_szDev += GetInputItemHtml(CONSTHTML.option, "", vtDev[i].szDevName, vtDev[i].dwDevID.ToString());
            }
        }
        m_Priority = GetAllInputHtml(CONSTHTML.option, "", "Priority");
        if (Request["op"] == "set")
        {
            bSet = true;

            RESVRULEREQ vrResvRuleReq = new RESVRULEREQ();
            string      szResvRuleID  = Request["dwID"];
            string      szDevID       = Request["devID"];

            if (szResvRuleID != null && szResvRuleID != "")
            {
                vrResvRuleReq.dwRuleSN = Parse(szResvRuleID);
            }
            else if (szDevID != null && szDevID != "")
            {
                vrResvRuleReq.dwDevID = Parse(szDevID);
            }
            UNIRESVRULE[] vtResvRule;
            if (m_Request.Reserve.ResvRuleGet(vrResvRuleReq, out vtResvRule) != REQUESTCODE.EXECUTE_SUCCESS)
            {
                MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL);
            }
            else
            {
                if (vtResvRule.Length == 0)
                {
                    MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL);
                }
                else
                {
                    PutJSObj(vtResvRule[0]);
                    m_Title = "修改预约规则【" + vtResvRule[0].szRuleName + "】";
                    ViewState["dwLatestResvTime"]   = vtResvRule[0].dwLatestResvTime.ToString();
                    ViewState["dwEarliestResvTime"] = vtResvRule[0].dwEarliestResvTime.ToString();
                    if (uResvFor == 2)
                    {
                        UNIDEVKIND devKind;

                        if (vtResvRule[0].dwDevKind != null && GetDevKindByID(vtResvRule[0].dwDevKind.ToString(), out devKind))
                        {
                            ViewState["kindName"] = devKind.szKindName.ToString();
                        }
                        else
                        {
                            ViewState["kindName"] = "全部";
                        }
                    }
                }
            }
        }
        else
        {
            m_Title = "修改预约规则";
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        UNICAMPUS[] vtCamp = GetAllCampus();
        szCamp += GetInputItemHtml(CONSTHTML.option, "", "全部", "0");
        if (vtCamp != null && vtCamp.Length > 0)
        {
            for (int i = 0; i < vtCamp.Length; i++)
            {
                szCamp += GetInputItemHtml(CONSTHTML.option, "", vtCamp[i].szCampusName, vtCamp[i].dwCampusID.ToString());
            }
        }
        UNIDEVCLS[] vtKind = GetAllDevCls();
        szKinds += GetInputItemHtml(CONSTHTML.option, "", "全部", "0");
        for (int i = 0; vtKind != null && i < vtKind.Length; i++)
        {
            szKinds += GetInputItemHtml(CONSTHTML.option, "", vtKind[i].szClassName.ToString(), vtKind[i].dwClassID.ToString());
        }
        UNIBUILDING[] vtBuilding = getAllBuilding();
        szBuilding += GetInputItemHtml(CONSTHTML.option, "", "全部", "0");
        for (int i = 0; i < vtBuilding.Length; i++)
        {
            if (vtBuilding[i].dwCampusID.ToString() == vtCamp[0].dwCampusID.ToString())
            {
                szBuilding += GetInputItemHtml(CONSTHTML.option, "", vtBuilding[i].szBuildingName.ToString(), vtBuilding[i].dwBuildingID.ToString());
            }
        }
        CODINGTABLE[] vtCodeing = getCodeTableByType((uint)CODINGTABLE.DWCODETYPE.CODE_YARDRESVKIND);
        for (int i = 0; vtCodeing != null && i < vtCodeing.Length; i++)
        {
            szYardKind += GetInputItemHtml(CONSTHTML.radioButton, "dwKind", vtCodeing[i].szCodeName, vtCodeing[i].szCodeSN);
        }
        UNILAB newLab;

        if (IsPostBack)
        {
        }

        if (Request["op"] == "set")
        {
            bSet = true;
            REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL;
            YARDRESVREQ vrPar     = new YARDRESVREQ();
            string      szResvID  = Request["ID"];
            vrPar.dwResvID   = Parse(szResvID);
            vrPar.dwStatFlag = (uint)RESVREQ.DWSTATFLAG.STATFLAG_INUSE + (uint)RESVREQ.DWSTATFLAG.STATFLAG_OVER;
            YARDRESV[] vtRes;
            uResponse = m_Request.Reserve.GetYardResv(vrPar, out vtRes);
            if (uResponse != REQUESTCODE.EXECUTE_SUCCESS)
            {
                MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL);
            }
            else if (vtRes.Length > 0 && vtRes[0].dwActivitySN != null)
            {
                YARDRESV yardResv = vtRes[0];
                szMemoYardResv = vtRes[0].szMemo;
                uint uResvPro = (uint)yardResv.dwProperty;

                PutHTTPObj(yardResv);

                if ((uResvPro & 67108864) > 0)//是否使用多媒体
                {
                    PutMemberValue("resvPro3", "1");
                }
                else
                {
                    PutMemberValue("resvPro2", "2");
                }
                if ((uResvPro & (uint)UNIRESERVE.DWPROPERTY.RESVPROP_UNOPEN) > 0)//是否公开
                {
                    PutMemberValue("resvPro4", "2");
                }
                else
                {
                    PutMemberValue("resvPro4", "1");
                }

                PutMemberValue("dwKind", yardResv.dwKind.ToString());
                szResvDevName  = vtRes[0].szDevName;
                szResvDevDept  = vtRes[0].szDeptName;
                szApplyName    = vtRes[0].szApplicantName;
                szActivity     = vtRes[0].szActivityName;
                szPeople       = vtRes[0].dwMinAttendance.ToString() + "-" + vtRes[0].dwMaxAttendance.ToString() + "人";
                szOrganiger    = vtRes[0].szOrganiger;
                szOrganization = vtRes[0].szOrganization;

                szPreDate   = vtRes[0].dwPreDate.ToString();
                szResvBegin = Get1970Date(vtRes[0].dwBeginTime, "HHmm");
                szResvEnd   = Get1970Date(vtRes[0].dwEndTime, "HHmm");


                szLeveal        = GetJustNameEqual(vtRes[0].dwActivityLevel, "Yard_ActivityLevel");
                szSecurityLevel = GetJustNameEqual(vtRes[0].dwSecurityLevel, "Yard_dwSecurityLevel");
                szDirectors     = GetJustNameEqual(vtRes[0].dwCheckKinds, "Yard_dwDirectors");
                szDesiredUser   = yardResv.szDesiredUser;
                dwMinAttendance = yardResv.dwMaxAttendance.ToString();

                uint         uCheckKinds    = (uint)vtRes[0].dwCheckKinds;
                CHECKTYPEREQ vrCheckTypeReq = new CHECKTYPEREQ();
                vrCheckTypeReq.dwMainKind = (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_SERVICE;
                CHECKTYPE[] vtCheckType;
                if (m_Request.Admin.CheckTypeGet(vrCheckTypeReq, out vtCheckType) == REQUESTCODE.EXECUTE_SUCCESS && vtCheckType != null && vtCheckType.Length > 0)
                {
                    for (int m = 0; m < vtCheckType.Length; m++)
                    {
                        if ((uCheckKinds & (uint)vtCheckType[m].dwCheckKind) > 0)
                        {
                            szServiceType += vtCheckType[m].szCheckName + ",";
                        }
                    }
                }
                if ((vtRes[0].dwProperty & ((uint)UNIRESERVE.DWPROPERTY.RESVPROP_NEEDVIDEO)) > 0)
                {
                    szNeedCameor = "需要";
                }
                UNIACCOUNT accno;
                if (GetAccByAccno(vtRes[0].dwApplicantID.ToString(), out accno))
                {
                    accno.szTrueName = accno.szTrueName + "(" + accno.szLogonName + ")";
                    PutMemberValue("szTrueName", accno.szTrueName);
                    szMemo = vtRes[0].szMemo;

                    string[] szMemoList = szMemo.Split('$');
                    if (szMemoList != null && szMemoList.Length > 0)
                    {
                        szMemo    = szMemoList[0];
                        szMemoExt = szMemoList[0].Replace("&", ",");
                    }
                }
                szResvTime = vtRes[0].szCycRule;
                if (szResvTime == "")
                {
                    szResvTime = Get1970Date(vtRes[0].dwBeginTime) + "至" + Get1970Date(vtRes[0].dwEndTime) + ";";
                }
                if (vtRes[0].szApplicationURL != null && vtRes[0].szApplicationURL != "")
                {
                    PutMemberValue("szApplicationURL", vtRes[0].szApplicationURL);
                }
            }
        }
        else
        {
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        string szOp = "新建";

        if (Request["op"] == "set")
        {
            szOp = "修改";
        }
        if (IsPostBack)
        {
            {
                UNIRESVRULE newResvRule;
                GetHTTPObj(out newResvRule);
                newResvRule.dwResvPurpose      = Parse(Request["dwResvPurpose2"]);
                newResvRule.dwLatestResvTime   = 24 * 60 * newResvRule.dwLatestResvTime;
                newResvRule.dwEarliestResvTime = 24 * 60 * newResvRule.dwEarliestResvTime;
                newResvRule.dwLimit            = (uint)UNIRESVRULE.DWLIMIT.RESVLIMIT_NOCONFLICTCHECK;// CharListToUint(Request["dwLimit"]);
                if (uResvFor == 1)
                {
                    if (((uint)newResvRule.dwLimit & ((uint)UNIRESVRULE.DWLIMIT.RESVLIMIT_DEV)) <= 0)
                    {
                        newResvRule.dwLimit = (uint)newResvRule.dwLimit | (uint)UNIRESVRULE.DWLIMIT.RESVLIMIT_DEV;
                    }
                }
                else if (uResvFor == 2)
                {
                    if (((uint)newResvRule.dwLimit & ((uint)UNIRESVRULE.DWLIMIT.RESVLIMIT_DEVKIND)) <= 0)
                    {
                        newResvRule.dwLimit = (uint)newResvRule.dwLimit;
                    }
                }
                if ((uint)newResvRule.dwGroupID != 0)
                {
                    int nDeptID = -1;
                    newResvRule.dwDeptID = 0xFFFFFFFF;
                }
                if (newResvRule.dwDevID != null && ((uint)newResvRule.dwDevID != 0))
                {
                    newResvRule.dwDevKind = 0;
                }
                string ExtCheckType = Request["ExtCheckType"];
                if (ExtCheckType == null)
                {
                    ExtCheckType = "";
                }
                string[]        checkTypeList = ExtCheckType.Split(',');
                int             uLen          = checkTypeList.Length;
                RULECHECKINFO[] checkInfo     = new RULECHECKINFO[uLen];
                string          szNoCheck     = Request["noChencType"];
                szNoCheck = "," + szNoCheck + ",";
                for (int i = 0; i < uLen; i++)
                {
                    uint uCheckKind = CharListToUint(Request["ExtCheckType" + checkTypeList[i]]);
                    checkInfo[i].dwCheckKind  = Parse(checkTypeList[i]);
                    checkInfo[i].dwBeforeKind = uCheckKind;
                    if (szNoCheck.IndexOf("," + checkTypeList[i] + ",") > -1)
                    {
                        checkInfo[i].dwProperty = (uint)RULECHECKINFO.DWPROPERTY.CHECKPROP_SUB;
                    }
                    else
                    {
                        checkInfo[i].dwProperty = (uint)RULECHECKINFO.DWPROPERTY.CHECKPROP_MAIN;
                    }
                }
                newResvRule.CheckTbl   = null;
                newResvRule.dwPriority = 2;
                if (m_Request.Reserve.ResvRuleSet(newResvRule, out newResvRule) != REQUESTCODE.EXECUTE_SUCCESS)
                {
                    return;
                }
                newResvRule.CheckTbl   = checkInfo;
                newResvRule.dwLimit    = 0;
                newResvRule.dwPriority = Parse(Request["dwPriority"]);

                if (m_Request.Reserve.ResvRuleSet(newResvRule, out newResvRule) != REQUESTCODE.EXECUTE_SUCCESS)
                {
                    return;
                }
                MessageBox(szOp + "规则配置成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK);
                return;
            }
        }
        UNIDEVICE[] vtDevList;
        m_szDevice += GetInputItemHtml(CONSTHTML.option, "", "全部", "0");
        if (GetAllDev(out vtDevList) && vtDevList != null && vtDevList.Length > 0)
        {
            for (int i = 0; i < vtDevList.Length; i++)
            {
                m_szDevice += GetInputItemHtml(CONSTHTML.option, "", vtDevList[i].szDevName.ToString(), vtDevList[i].dwDevID.ToString());
            }
        }
        m_szIdent       = GetAllInputHtml(CONSTHTML.option, "", "Ident");
        m_szResvPurpose = GetAllInputHtml(CONSTHTML.radioButton, "dwResvPurpose", "ResvPurpose");
        m_Limit         = GetAllInputHtml(CONSTHTML.checkBox, "dwLimit", "ResvRule_Limit");
        UNIDEVCLS[] vtDevCls = GetDevCLS(0);
        if (vtDevCls != null && vtDevCls.Length > 0)
        {
            m_szDevCLS += "<option value='" + "0" + "'>" + "全部适用" + "</option>";
            for (int i = 0; i < vtDevCls.Length; i++)
            {
                m_szDevCLS += GetInputItemHtml(CONSTHTML.option, "", vtDevCls[i].szClassName, vtDevCls[i].dwClassID.ToString());
            }
        }
        UNIDEPT[] dept = GetAllDept();
        m_szDept += "<option value='" + "0" + "'>" + "全部适用" + "</option>";
        if (dept != null)
        {
            for (int i = 0; i < dept.Length; i++)
            {
                m_szDept += GetInputItemHtml(CONSTHTML.option, "", dept[i].szName.ToString(), dept[i].dwID.ToString());
            }
        }
        UNIDEVKIND[] devKind = GetAllDevKind();
        if (devKind != null)
        {
            for (int i = 0; i < devKind.Length; i++)
            {
                m_szDevKind += GetInputItemHtml(CONSTHTML.checkBox, "szUsableKindIDs", devKind[i].szKindName, devKind[i].dwKindID.ToString());
            }
        }
        YARDACTIVITYREQ activityReq = new YARDACTIVITYREQ();

        YARDACTIVITY[] vtYardAcitivty;
        m_szYardActivity += GetInputItemHtml(CONSTHTML.option, "", "全部", "0");
        if (m_Request.Reserve.GetYardActivity(activityReq, out vtYardAcitivty) == REQUESTCODE.EXECUTE_SUCCESS && vtYardAcitivty != null && vtYardAcitivty.Length > 0)
        {
            for (int i = 0; i < vtYardAcitivty.Length; i++)
            {
                m_szYardActivity += GetInputItemHtml(CONSTHTML.option, "", vtYardAcitivty[i].szActivityName, vtYardAcitivty[i].dwActivitySN.ToString());
            }
        }
        m_Property = GetInputHtmlFromXml(0, CONSTHTML.radioButton, "dwProperty", "CheckType_Property", true);
        m_level    = GetInputHtmlFromXml(0, CONSTHTML.option, "", "Yard_ActivityLevel", true);

        CHECKTYPEREQ checkTypeReq = new CHECKTYPEREQ();

        CHECKTYPE[] vtCheckType;
        if (m_Request.Admin.CheckTypeGet(checkTypeReq, out vtCheckType) == REQUESTCODE.EXECUTE_SUCCESS && vtCheckType != null && vtCheckType.Length > 0)
        {
            m_szExtCheckType += "<tr><td class='td' style='text-align:center;height:20px;' colspan='1'>需审核部门</td><td class='td'>是否审核</td><td style='text-align:center;height:20px' colspan='2' class='td'>所依赖审核部门</td></tr>";
            for (int i = 0; i < vtCheckType.Length; i++)
            {
                m_szExtCheckType += "<tr><td class='td' colspan='1' style='text-align:center;height:20px;width:180px;'>";
                m_szExtCheckType += GetInputItemHtml(CONSTHTML.checkBox, "ExtCheckType", vtCheckType[i].szCheckName, vtCheckType[i].dwCheckKind.ToString());
                m_szExtCheckType += "<td class='td' colspan='1' style='width:58px' >" + GetInputItemHtml(CONSTHTML.checkBox, "noChencType", "不审核", vtCheckType[i].dwCheckKind.ToString()) + "</td>";
                m_szExtCheckType += "</td>";
                m_szExtCheckType += "<td class='td' colspan='2' style='text-align:left;height:20px'>";
                for (int j = 0; j < vtCheckType.Length; j++)
                {
                    if (vtCheckType[j].dwCheckKind != vtCheckType[i].dwCheckKind)
                    {
                        m_szExtCheckType += GetInputItemHtml(CONSTHTML.checkBox, "ExtCheckType" + vtCheckType[i].dwCheckKind, vtCheckType[j].szCheckName, vtCheckType[j].dwCheckKind.ToString());
                    }
                }
                m_szExtCheckType += "</td>";
                m_szExtCheckType += "</tr>";
            }
        }
        if (Request["extValue"] != "")
        {
            PutMemberValue("dwExtValue", Request["extValue"]);
        }
        if (Request["op"] == "set")
        {
            bSet = true;

            RESVRULEREQ vrResvRuleReq = new RESVRULEREQ();
            string      szResvRuleID  = Request["dwID"];
            string      szDevID       = Request["devID"];

            if (szResvRuleID != null && szResvRuleID != "")
            {
                vrResvRuleReq.dwRuleSN = Parse(szResvRuleID);
            }
            else if (szDevID != null && szDevID != "")
            {
                vrResvRuleReq.dwDevID = Parse(szDevID);
            }
            UNIRESVRULE[] vtResvRule;
            if (m_Request.Reserve.ResvRuleGet(vrResvRuleReq, out vtResvRule) != REQUESTCODE.EXECUTE_SUCCESS)
            {
                MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL);
            }
            else
            {
                if (vtResvRule.Length == 0)
                {
                    MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL);
                }
                else
                {
                    PutJSObj(vtResvRule[0]);
                    string szCheckKind   = "";
                    string szNoCheckKind = "";
                    if (vtResvRule[0].CheckTbl != null)
                    {
                        for (int i = 0; i < vtResvRule[0].CheckTbl.Length; i++)
                        {
                            szCheckKind += vtResvRule[0].CheckTbl[i].dwCheckKind + ",";
                            if ((vtResvRule[0].CheckTbl[i].dwProperty & (uint)RULECHECKINFO.DWPROPERTY.CHECKPROP_SUB) > 0)
                            {
                                szNoCheckKind += vtResvRule[0].CheckTbl[i].dwCheckKind + ",";
                            }
                            PutMemberValue("ExtCheckType" + vtResvRule[0].CheckTbl[i].dwCheckKind, vtResvRule[0].CheckTbl[i].dwBeforeKind.ToString());
                        }
                    }
                    PutMemberValue("ExtCheckType", szCheckKind);
                    PutMemberValue("noChencType", szNoCheckKind);
                    m_Title = "修改规则配置【" + vtResvRule[0].szRuleName + "】";
                    ViewState["dwLatestResvTime"]   = vtResvRule[0].dwLatestResvTime.ToString();
                    ViewState["dwEarliestResvTime"] = vtResvRule[0].dwEarliestResvTime.ToString();
                    if (uResvFor == 2)
                    {
                        UNIDEVKIND devKind2;

                        if (vtResvRule[0].dwDevKind != null && GetDevKindByID(vtResvRule[0].dwDevKind.ToString(), out devKind2))
                        {
                            ViewState["kindName"] = devKind2.szKindName.ToString();
                        }
                        else
                        {
                            ViewState["kindName"] = "全部";
                        }
                    }
                }
            }
        }
        else
        {
            m_Title = szOp + "规则配置";
        }
    }
Exemple #9
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string szOP = "新建";

        if (Request["op"] == "set")
        {
            szOP = "修改";
        }
        CHECKTYPE newCheckType;

        if (IsPostBack)
        {
            GetHTTPObj(out newCheckType);
            if (((uint)newCheckType.dwMainKind) == (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_DEVMAN)
            {
                newCheckType.dwCheckLevel = (uint)UNIADMIN.DWMANLEVEL.MANLEVEL_DEPT;
            }
            else if (((uint)newCheckType.dwMainKind) == (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_DIRECTOR)
            {
                if (newCheckType.dwDeptID != null && newCheckType.dwDeptID != 0)
                {
                    newCheckType.dwCheckLevel = (uint)UNIADMIN.DWMANLEVEL.MANLEVEL_SCHOOL;
                }
                else
                {
                    newCheckType.dwCheckLevel = (uint)UNIADMIN.DWMANLEVEL.MANLEVEL_DEPT;
                    newCheckType.szDeptName   = "";
                }
            }
            else if (((uint)newCheckType.dwMainKind) == (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_PUBLICITY)
            {
                newCheckType.dwCheckLevel = (uint)UNIADMIN.DWMANLEVEL.MANLEVEL_SCHOOL;
            }
            else if (((uint)newCheckType.dwMainKind) == (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_SECURITY)
            {
                newCheckType.dwCheckLevel = (uint)UNIADMIN.DWMANLEVEL.MANLEVEL_SCHOOL;
            }

            if (m_Request.Admin.CheckTypeSet(newCheckType) != REQUESTCODE.EXECUTE_SUCCESS)
            {
                MessageBox(m_Request.szErrMessage, szOP + "审核类型失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE);
            }
            else
            {
                MessageBox(szOP + "审核类型成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK);
                return;
            }
        }
        m_szCheckTypeKind     = GetInputHtmlFromXml(0, CONSTHTML.option, "", "CheckType_Kind", true);
        m_szCheckTypeMainKind = GetInputHtmlFromXml(0, CONSTHTML.option, "", "CheckType_MainKind", true);
        m_Property            = GetInputHtmlFromXml(0, CONSTHTML.radioButton, "dwProperty", "CheckType_Property", true);
        m_level = GetInputHtmlFromXml(0, CONSTHTML.option, "", "Yard_ActivityLevel", true);
        if (Request["op"] == "set")
        {
            bSet = true;

            CHECKTYPEREQ vrGet = new CHECKTYPEREQ();
            vrGet.dwCheckKind = Parse(Request["dwID"]);
            CHECKTYPE[] vtRes;
            if (m_Request.Admin.CheckTypeGet(vrGet, out vtRes) != REQUESTCODE.EXECUTE_SUCCESS)
            {
                MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL);
            }
            else
            {
                if (vtRes.Length == 0)
                {
                    MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL);
                }
                else
                {
                    PutJSObj(vtRes[0]);
                    m_Title = "修改【" + vtRes[0].szCheckName + "】";
                }
            }
        }
        else
        {
            m_Title = "审核类型";
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        REQUESTCODE          uResponse = REQUESTCODE.EXECUTE_FAIL;
        YARDRESVCHECKINFOREQ vrPar     = new YARDRESVCHECKINFOREQ();
        string szOrderKey  = Request["_szOrderKey"];
        string szOrderMode = Request["_szOrderMode"];

        GetHTTPObj(out vrPar);
        if (szOrderKey != null && szOrderKey != "")
        {
            vrPar.szReqExtInfo             = new REQEXTINFO();
            vrPar.szReqExtInfo.szOrderKey  = szOrderKey;
            vrPar.szReqExtInfo.szOrderMode = szOrderMode;
        }
        string szYardKind = Request["yardKind"];
        uint   uYardKind  = Parse(szYardKind);

        if (!IsPostBack)
        {
            //   dwStartDate.Value = DateTime.Now.ToString("yyyy-MM-dd");
            // dwEndDate.Value = DateTime.Now.ToString("yyyy-MM-dd");
        }
        if (dwStartDate.Value != null && dwEndDate.Value != null && dwStartDate.Value != "" && dwEndDate.Value != "")
        {
            vrPar.dwBeginDate = GetDate(dwStartDate.Value);
            vrPar.dwEndDate   = GetDate(dwEndDate.Value);
        }
        else
        {
            vrPar.dwBeginDate = null;
            vrPar.dwEndDate   = null;
        }
        CODINGTABLE[] vtCodeing = getCodeTableByType((uint)CODINGTABLE.DWCODETYPE.CODE_YARDRESVKIND);
        szCodeing += GetInputItemHtml(CONSTHTML.radioButton, "dwKind", "全部", "0");
        for (int i = 0; vtCodeing != null && i < vtCodeing.Length; i++)
        {
            szCodeing += GetInputItemHtml(CONSTHTML.radioButton, "dwKind", vtCodeing[i].szCodeName, vtCodeing[i].szCodeSN);
        }
        uint uKind = Parse(Request["dwKind"]);

        if (uKind != 0)
        {
            vrPar.dwKind = uKind;
        }
        else
        {
            vrPar.dwKind = null;
            PutMemberValue("dwKind", "0");
        }

        uint uBeginDate = GetDate(dwStartDate.Value);
        uint uEndDate   = GetDate(dwEndDate.Value);

        vrPar.dwNeedYardResv = 1;
        if (vrPar.dwCheckStat == null || ((uint)vrPar.dwCheckStat) == 0)
        {
            vrPar.dwCheckStat = (uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_CANDO;
        }
        YARDRESVCHECKINFO[] vtRes;
        string     szResvTime    = "";
        string     szResvTimeAll = "";
        ArrayList  listResvID    = new ArrayList();
        REQEXTINFO extInfo       = vrPar.szReqExtInfo;

        if (extInfo.szOrderKey == null)
        {
            extInfo.szOrderKey  = "dwCheckTime";
            extInfo.szOrderMode = "desc";
        }
        //  vrPar.dwCheckStat= vrPar.dwCheckStat|(uint)


        uResponse = m_Request.Reserve.GetYardResvCheckInfo(vrPar, out vtRes);

        CHECKTYPEREQ vrGet = new CHECKTYPEREQ();

        CHECKTYPE[] vtCheck;
        if (m_Request.Admin.CheckTypeGet(vrGet, out vtCheck) == REQUESTCODE.EXECUTE_SUCCESS && vtCheck != null && vtCheck.Length > 0)
        {
        }


        ArrayList yardResvListLast = new ArrayList();

        if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtRes != null && vtRes.Length > 0)
        {
            //合并 结果到yardResvListLastID,
            for (int i = 0; i < vtRes.Length; i++)
            {
                uint uResvIDTemp = 0;
                if (vtRes[i].YardResv.dwResvGroupID != null)
                {
                    uResvIDTemp = (uint)vtRes[i].YardResv.dwResvGroupID;
                }
                else
                {
                    continue;
                }
                bool isAdd    = true;
                int  uPostion = -1;

                CHECKTYPE checktype = new CHECKTYPE();
                if (GetCheckType((uint)vtRes[i].dwCheckKind, out checktype, vtCheck))
                {
                    if ((checktype.dwMainKind & (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_SERVICE) > 0)
                    {
                        continue;
                    }
                }
                for (int k = 0; k < yardResvListLast.Count; k++)
                {
                    YARDRESVCHECKINFO tempClass = (YARDRESVCHECKINFO)yardResvListLast[k];
                    if (tempClass.YardResv.dwResvGroupID == uResvIDTemp)
                    {
                        uPostion = k;
                        isAdd    = false;
                        break;
                    }
                }
                if (isAdd)
                {
                    YARDRESVCHECKINFO newClassTemp = new YARDRESVCHECKINFO();
                    newClassTemp = vtRes[i];
                    newClassTemp.szCheckDetail          = newClassTemp.dwCheckID.ToString() + ',';
                    newClassTemp.YardResv.dwResvGroupID = uResvIDTemp;
                    newClassTemp.szMemo = Get1970Date(vtRes[i].YardResv.dwBeginTime) + "至" + Get1970Date(vtRes[i].YardResv.dwEndTime) + ";";
                    yardResvListLast.Add(newClassTemp);
                }
                else
                {
                    YARDRESVCHECKINFO newClassTemp = new YARDRESVCHECKINFO();
                    newClassTemp = (YARDRESVCHECKINFO)yardResvListLast[uPostion];
                    newClassTemp.YardResv.dwResvGroupID = uResvIDTemp;
                    string szMemo = newClassTemp.szMemo.ToString();
                    newClassTemp.szMemo        = szMemo + Get1970Date(vtRes[i].YardResv.dwBeginTime) + "至" + Get1970Date(vtRes[i].YardResv.dwEndTime) + ";";
                    newClassTemp.szCheckDetail = newClassTemp.szCheckDetail + vtRes[i].dwCheckID.ToString() + ',';
                    if (newClassTemp.szCheckName.IndexOf(vtRes[i].szCheckName) < 0)
                    {
                        newClassTemp.szCheckName += "," + vtRes[i].szCheckName;
                    }
                    yardResvListLast[uPostion] = newClassTemp;
                }
            }
            for (int i = 0; i < vtRes.Length; i++)
            {
                uint uResvIDTemp = 0;
                if (vtRes[i].YardResv.dwResvGroupID != null)
                {
                    uResvIDTemp = (uint)vtRes[i].YardResv.dwResvGroupID;
                }

                bool isAdd    = true;
                int  uPostion = -1;

                CHECKTYPE checktype = new CHECKTYPE();
                if (GetCheckType((uint)vtRes[i].dwCheckKind, out checktype, vtCheck))
                {
                    if ((checktype.dwMainKind & (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_SERVICE) > 0)
                    {
                        for (int k = 0; k < yardResvListLast.Count; k++)
                        {
                            YARDRESVCHECKINFO tempClass = (YARDRESVCHECKINFO)yardResvListLast[k];
                            if (tempClass.YardResv.dwResvGroupID == uResvIDTemp)
                            {
                                uPostion = k;
                                isAdd    = false;
                                break;
                            }
                        }
                        if (isAdd)
                        {
                            YARDRESVCHECKINFO newClassTemp = new YARDRESVCHECKINFO();
                            newClassTemp = vtRes[i];
                            newClassTemp.szCheckDetail          = newClassTemp.dwCheckID.ToString() + ',';
                            newClassTemp.YardResv.dwResvGroupID = uResvIDTemp;
                            newClassTemp.szMemo = Get1970Date(vtRes[i].YardResv.dwBeginTime) + "至" + Get1970Date(vtRes[i].YardResv.dwEndTime) + ";";
                            yardResvListLast.Add(newClassTemp);
                        }
                        else
                        {
                            YARDRESVCHECKINFO newClassTemp = new YARDRESVCHECKINFO();
                            newClassTemp = (YARDRESVCHECKINFO)yardResvListLast[uPostion];
                            newClassTemp.YardResv.dwResvGroupID = uResvIDTemp;
                            string szMemo = newClassTemp.szMemo.ToString();
                            newClassTemp.szMemo        = szMemo + Get1970Date(vtRes[i].YardResv.dwBeginTime) + "至" + Get1970Date(vtRes[i].YardResv.dwEndTime) + ";";
                            newClassTemp.szCheckDetail = newClassTemp.szCheckDetail + vtRes[i].dwCheckID.ToString() + ',';
                            newClassTemp.szCheckName  += "," + vtRes[i].szCheckName;
                            yardResvListLast[uPostion] = newClassTemp;
                        }
                    }
                }
            }
            for (int m = 0; m < yardResvListLast.Count; m++)
            {
                szResvTimeAll = "";
                szResvTime    = "";
                YARDRESVCHECKINFO newClassTemp = new YARDRESVCHECKINFO();
                newClassTemp = (YARDRESVCHECKINFO)yardResvListLast[m];


                if (Session["checkid"] != null && Session["checkid"].ToString().IndexOf(newClassTemp.dwCheckID.ToString()) > -1)
                {
                    m_szOut += "<tr bgcolor='#2E8B57'>";
                }
                else
                {
                    m_szOut += "<tr>";
                }

                m_szOut += "<td data-ActivityLevel ='" + newClassTemp.YardResv.dwSecurityLevel + "' data-checkIDs='" + newClassTemp.szCheckDetail + "' data-ActivityLevel ='" + newClassTemp.YardResv.dwSecurityLevel + "' data-resvGroupID='" + newClassTemp.YardResv.dwResvGroupID.ToString() + "' class='getInfo' data-id=" + newClassTemp.szCheckDetail.ToString() + ">" + newClassTemp.YardResv.szActivityName + "</td>";
                m_szOut += "<td>" + newClassTemp.YardResv.dwResvGroupID + "</td>";
                m_szOut += "<td>" + newClassTemp.YardResv.szResvName + "</td>";
                m_szOut += "<td class='lnkAccount' data-id='" + newClassTemp.dwApplicantID.ToString() + "' data-ActivityLevel ='" + newClassTemp.YardResv.dwSecurityLevel + "' data-id=" + newClassTemp.dwCheckID.ToString() + ">" + newClassTemp.szApplicantName + "</td>";
                m_szOut += "<td>" + Get1970Date(newClassTemp.YardResv.dwOccurTime) + "</td>";
                m_szOut += "<td>" + newClassTemp.YardResv.szDevName + "</td>";
                string[] szResvTimeList = newClassTemp.szMemo.Split(';');

                if (szResvTimeList != null && szResvTimeList.Length > 0)
                {
                    if (szResvTimeList.Length > 1)
                    {
                        szResvTime += "【" + (szResvTimeList.Length - 1) + "】条:" + "<br/>";
                    }
                    for (int k = 0; k < szResvTimeList.Length; k++)
                    {
                        if (k < 5)
                        {
                            if (((k + 1) % 2) == 0)
                            {
                                szResvTime += szResvTimeList[k] + ";<br/>";
                            }
                            else
                            {
                                szResvTime += szResvTimeList[k] + ";";
                            }
                        }
                        szResvTimeAll += szResvTimeList[k] + ";";
                    }
                }
                YARDRESV[] yardresvList = GetYardResvByGroupID((uint)newClassTemp.YardResv.dwResvGroupID);
                if (newClassTemp.YardResv.szCycRule == null || newClassTemp.YardResv.szCycRule == "")
                {
                    m_szOut += "<td class='tdDetail' text='" + szResvTimeAll + "'>" + Get1970Date(newClassTemp.YardResv.dwBeginTime) + "到" + Get1970Date(newClassTemp.YardResv.dwEndTime) + "</td>";
                }
                else
                {
                    m_szOut += "<td class='tdDetail' text='" + szResvTimeAll + "'>" + newClassTemp.YardResv.szCycRule + "</td>";
                }
                string    szCheckName = "";
                CHECKTYPE checkType   = new CHECKTYPE();
                if (GetCheckType((uint)newClassTemp.dwCheckKind, out checkType, vtCheck))
                {
                    szCheckName = GetJustNameEqual((uint)checkType.dwMainKind, "CheckType_Kind");
                }
                m_szOut += "<td>" + (newClassTemp.szCheckName) + "</td>";
                m_szOut += "<td>" + GetJustNameEqual(newClassTemp.dwCheckStat, "Admin_CheckStatus") + "</td>";
                m_szOut += "<td>" + Get1970Date(newClassTemp.dwCheckTime) + "</td>";
                m_szOut += "<td>" + newClassTemp.szAdminName + "</td>";
                if ((newClassTemp.dwCheckStat & (uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_CANDO) > 0)
                {
                    m_szOut += "<td><div class='OPTD'></div></td>";
                }
                else
                {
                    m_szOut += "<td><div class='OPTD OPTD2'></div></td>";
                }

                m_szOut += "</tr>";
            }
        }
        PutBackValue();
    }