Ejemplo n.º 1
0
    private void upOpenid()
    {
        string id      = Request["ID"];
        string openid  = Request["openid"];
        uint   session = ToUInt(Request["session"]);

        if (string.IsNullOrEmpty(id) || session == 0)
        {
            ErrMsgP();
            return;
        }
        m_Request.m_UniDCom.SessionID = session;//重置session
        UNIACCOUNT[] accs = GetAccById(id);
        if (accs != null)
        {
            UNIACCOUNT set = accs[0];
            set.szMSN    = openid;
            set.szPasswd = null;
            UpdateAcc(set);
        }
        else
        {
            ErrMsg("获取账户失败");
        }
    }
Ejemplo n.º 2
0
    private void DelWeChat()
    {
        UNIACCOUNT set = new UNIACCOUNT();

        set.szMSN = "";
        UpdateAcc(set);
    }
Ejemplo n.º 3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string     szKindID = Request["devkind"];
        DEVKINDREQ kindGet  = new DEVKINDREQ();

        kindGet.dwKindID = ToUInt(szKindID);
        UNIDEVKIND[] vtKind;
        if (m_Request.Device.DevKindGet(kindGet, out vtKind) == REQUESTCODE.EXECUTE_SUCCESS && vtKind != null && vtKind.Length > 0)
        {
            kindurl = vtKind[0].szDevKindURL.ToString();
        }
        if (Request["back"] == "true")
        {
            isBack = "";
        }
        if (IsLogined())
        {
            UNIACCOUNT acc = (UNIACCOUNT)Session["LOGIN_ACCINFO"];
            if ((ToUInt(GetConfig("resvKind")) & 1024) > 0)
            {
                CODINGTABLE[] list = GetCodeTable((uint)CODINGTABLE.DWCODETYPE.CODE_ACTIVITYKIND, null);
                if (list != null && list.Length > 0)
                {
                    for (int i = 0; i < list.Length; i++)
                    {
                        atyKinds += "<option value='" + list[i].szCodeSN + "'>" + list[i].szCodeName + "</option>";
                    }
                }
            }
        }
    }
Ejemplo n.º 4
0
    void CreateRTest()
    {
        UNIACCOUNT acc = (UNIACCOUNT)Session["LOGIN_ACCINFO"];

        if ((Convert.ToUInt32(acc.dwIdent) & (uint)UNIACCOUNT.DWIDENT.EXTIDENT_TUTOR) > 0)
        {
            string       rtName    = Request["rtname"];//Server.UrlDecode(
            string       memList   = Request["memlist"];
            REQUESTCODE  uResponse = REQUESTCODE.EXECUTE_FAIL;
            RESEARCHTEST setvalue  = new RESEARCHTEST();
            setvalue.dwHolderID   = acc.dwAccNo;
            setvalue.szHolderName = acc.szTrueName;
            setvalue.szRTName     = rtName;
            setvalue.dwLeaderID   = acc.dwAccNo;
            setvalue.szLeaderName = acc.szTrueName;

            memList += acc.szLogonName.ToString();
            uint groupId = NewGroup(rtName, memList);

            setvalue.dwGroupID = groupId;
            uResponse          = m_Request.Reserve.SetResearchTest(setvalue, out setvalue);
            if (uResponse == REQUESTCODE.EXECUTE_SUCCESS)
            {
                Response.Write("{\"ret\":1}");
            }
            else
            {
                Response.Write("{\"ret\":0,\"msg\":\"" + m_Request.szErrMessage + "\"}");
            }
        }
        else
        {
            Response.Write("{\"ret\":0,\"msg\":\"您不是导师,没有权限!\"}");
        }
    }
Ejemplo n.º 5
0
 //更新当前用户(必须已登录)
 private void UpdateAcc(UNIACCOUNT acc)
 {
     if (m_Request.Account.Set(acc, out acc) == REQUESTCODE.EXECUTE_SUCCESS)
     {
         //由于acc仅返回修改过的字段,不得不遍历acc把修改字段手动更新到curAcc
         //临时方法,若能返回完整acc,可直接把acc赋值curAcc
         object obj_set = curAcc;
         System.Reflection.FieldInfo[] infos = typeof(UNIACCOUNT).GetFields();
         for (int i = 0; i < infos.Length; i++)
         {
             System.Reflection.FieldInfo info = infos[i];
             object value = info.GetValue(acc);
             if (value != null && value.ToString() != "0")
             {
                 info.SetValue(obj_set, value);
             }
         }
         curAcc = (UNIACCOUNT)obj_set;
         //////////
         curAcc.szPasswd          = null;
         Session["LOGIN_ACCINFO"] = curAcc;
         SucMsg();
     }
     else
     {
         ErrMsg(m_Request.szErrMessage);
     }
 }
Ejemplo n.º 6
0
    private void SetActivityPlan(UNIACTIVITYPLAN vrParameter)
    {
        if (m_Request.Reserve.SetActivityPlan(vrParameter, out vrParameter) == REQUESTCODE.EXECUTE_SUCCESS)
        {
            REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL;
            object      obj       = Session["LOGIN_ACCINFO"];
            UNIACCOUNT  acc       = new UNIACCOUNT();
            if (obj != null)
            {
                acc = (UNIACCOUNT)(obj);
            }

            GROUPMEMBER setValueMember = new GROUPMEMBER();
            setValueMember.dwKind     = (uint)GROUPMEMBER.DWKIND.MEMBERKIND_PERSONAL;
            setValueMember.dwMemberID = acc.dwAccNo;
            setValueMember.szName     = acc.szTrueName.ToString();
            setValueMember.szMemo     = acc.szLogonName.ToString() + ":" + acc.szTrueName.ToString();
            setValueMember.dwGroupID  = vrParameter.dwGroupID;
            uResponse = m_Request.Group.SetGroupMember(setValueMember);
            MsgBox("你的申请预约已提交审核,审核结果将由短信形式发送,请注意查收");
        }
        else
        {
            if (vrParameter.dwResvID != null && vrParameter.dwResvID != 0)
            {
                UNIRESERVE para = new UNIRESERVE();
                para.dwResvID = vrParameter.dwResvID;
                m_Request.Reserve.Del(para);
            }
            MsgBox("对不起,申请失败" + m_Request.szErrMessage);
        }
    }
Ejemplo n.º 7
0
    private void InitrtList()
    {
        //获取项目列表
        REQUESTCODE     uResponse = REQUESTCODE.EXECUTE_FAIL;
        RESEARCHTESTREQ vrGet     = new RESEARCHTESTREQ();

        vrGet.szReqExtInfo.szOrderKey  = "szRTName";
        vrGet.szReqExtInfo.szOrderMode = "ASC";
        RESEARCHTEST[] vrResult;
        UNIACCOUNT     acc = (UNIACCOUNT)Session["LOGIN_ACCINFO"];

        vrGet.dwMemberID = acc.dwAccNo;
        uResponse        = m_Request.Reserve.GetResearchTest(vrGet, out vrResult);
        if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vrResult != null)
        {
            for (int i = 0; i < vrResult.Length; i++)
            {
                RESEARCHTEST test = vrResult[i];
                RTMEMBER[]   mbs  = test.RTMembers;
                for (int m = 0; m < mbs.Length; m++)
                {
                    if (mbs[m].dwAccNo == acc.dwAccNo && ((mbs[m].dwStatus & 2) > 0))
                    {
                        selRtList += "<li><a href='javascript:void(0);' class='get_item' con='#act_qzone' url='RTest.aspx?rtId=" + test.dwRTID + "'><span class='ui-icon ui-icon-calculator'></span>" + test.szRTName + "</a></li>";
                    }
                }
            }
        }
        else
        {
            MsgBox(m_Request.szErrMsg);
            return;
        }
    }
Ejemplo n.º 8
0
    protected uint newGroup()
    {
        REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL;
        object      obj       = Session["LOGIN_ACCINFO"];
        UNIACCOUNT  acc       = new UNIACCOUNT();

        if (obj != null)
        {
            acc = (UNIACCOUNT)obj;
        }
        UNIGROUP setValue = new UNIGROUP();

        setValue.dwKind           = ((uint)UNIGROUP.DWKIND.GROUPKIND_RERV);
        setValue.szName           = acc.szLogonName.ToString() + DateTime.Now.ToLongTimeString();
        setValue.dwEnrollDeadline = ToUInt(DateTime.Now.AddYears(10).ToString("yyyyMMdd"));
        uResponse = m_Request.Group.SetGroup(setValue, out setValue);
        if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && setValue.dwGroupID != null)
        {
            groupIDHidden.Value = setValue.dwGroupID.ToString();

            GROUPMEMBER setValueMember = new GROUPMEMBER();
            setValueMember.dwKind     = (uint)GROUPMEMBER.DWKIND.MEMBERKIND_PERSONAL;
            setValueMember.dwMemberID = acc.dwAccNo;
            setValueMember.szName     = acc.szTrueName.ToString();
            setValueMember.szMemo     = acc.szLogonName.ToString() + ":" + acc.szTrueName.ToString();
            SetGroup(setValueMember);

            return((uint)setValue.dwGroupID);
        }
        else
        {
            return(0);
        }
    }
Ejemplo n.º 9
0
    private uint?SetGroup(uint?max, string deadline)
    {
        string   name = Request["cls_name"];
        string   id   = Request["plan_id"];
        UNIGROUP set  = new UNIGROUP();

        if (!string.IsNullOrEmpty(name))
        {
            set.szName = name;
        }
        else
        {
            UNIACCOUNT acc = (UNIACCOUNT)Session["LOGIN_ACCINFO"];
            set.szName = acc.szTrueName + "_" + Request["course_name"];
        }
        if (!string.IsNullOrEmpty(id))
        {
            set.dwGroupID = ToUInt(id);
        }
        set.dwMinUsers       = 0;
        set.dwMaxUsers       = max;
        set.dwEnrollDeadline = ToUInt(deadline.Replace("-", ""));
        set.dwDeadLine       = term.dwEndDate;
        set.dwKind           = (uint)UNIGROUP.DWKIND.GROUPKIND_RERV;
        if (m_Request.Group.SetGroup(set, out set) == REQUESTCODE.EXECUTE_SUCCESS)
        {
            return(set.dwGroupID);
        }
        else
        {
            return(null);
        }
    }
Ejemplo n.º 10
0
    private void GetYardActivity()
    {
        string          aty = Request["activity"];
        YARDACTIVITYREQ req = new YARDACTIVITYREQ();

        YARDACTIVITY[] rlt;
        REQUESTCODE    cd = m_Request.Reserve.GetYardActivity(req, out rlt);

        if (cd == REQUESTCODE.EXECUTE_SUCCESS)
        {
            for (int i = 0; i < rlt.Length; i++)
            {
                //string select = "";
                //if (aty == rlt[i].dwActivitySN.ToString()) select = "selected";
                //itemClsList += "<option value='" + rlt[i].dwActivitySN + "' include='" + rlt[i].szUsableKindIDs + "' " + select + ">" + rlt[i].szActivityName + "</option>";
                if (rlt[i].dwSecurityLevel == 1)
                {
                    continue;                             //不开放
                }
                uint?      type = rlt[i].dwSecurityLevel;
                UNIACCOUNT acc  = (UNIACCOUNT)Session["LOGIN_ACCINFO"];
                if (((type & 0x20000000) > 0 || (type & 0x10000000) > 0) && (acc.dwIdent & 512) == 0)
                {
                    continue;      //非教师不开放会议和教室批量预约
                }
                bool auto = false; //(type & 0x20000000) > 0;//会议申请 自动搜索 暂时不启用 会议室数量不少 刷新缓慢
                itemList += "<li url='atydetail.aspx?rsch=" + (auto?"auto":"") + "&activityId=" + rlt[i].dwActivitySN + "'  con='#detail_con' class='click_load'><a>" + rlt[i].szActivityName + "</a></li>";
            }
        }
        else
        {
            MsgBox(m_Request.szErrMsg);
        }
    }
Ejemplo n.º 11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        GROUPREQ vrParameter = new GROUPREQ();
        string   szPID       = Request["szLogonName"];

        GetHTTPObj(out vrParameter);
        if (szPID != null && szPID != "")
        {
            UNIACCOUNT outAccno = new UNIACCOUNT();
            if (GetAccByLogonName(szPID, out outAccno, true))
            {
                vrParameter.dwAccNo = outAccno.dwAccNo;
            }
        }
        vrParameter.dwKind = Parse(Request["dwKind"]);
        UNIGROUP[] vrResult;
        GetPageCtrlValue(out vrParameter.szReqExtInfo);
        if (m_Request.Group.GetGroup(vrParameter, out vrResult) == REQUESTCODE.EXECUTE_SUCCESS)
        {
            for (int i = 0; i < vrResult.Length; i++)
            {
                m_szOut += "<tr>";
                m_szOut += "<td>" + vrResult[i].dwGroupID.ToString() + "</td>";
                m_szOut += "<td>" + vrResult[i].szName.ToString() + "</td>";
                m_szOut += "<td>" + vrResult[i].dwDeadLine.ToString() + "</td>";
                m_szOut += "<td>" + vrResult[i].szMemo.ToString() + "</td>";


                m_szOut += "</tr>";
            }
            UpdatePageCtrl(m_Request.Group);
        }

        PutBackValue();
    }
Ejemplo n.º 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        EXTIDENTACC newTutor;

        m_Title = "新建" + ConfigConst.GCTutorName;
        if (IsPostBack)
        {
            string     szAccno  = Request["dwAccNo"];
            UNIACCOUNT accTutor = new UNIACCOUNT();
            if (szAccno == null || (!GetAccByAccno(szAccno, out accTutor)))
            {
                MessageBox("未找到该人员", "新建" + ConfigConst.GCTutorName + "失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE);
                return;
            }
            GetHTTPObj(out newTutor);
            newTutor.dwAccNo    = accTutor.dwAccNo;
            newTutor.szTrueName = accTutor.szTrueName;
            newTutor.dwIdent    = (uint)UNIACCOUNT.DWIDENT.EXTIDENT_RTLEADER;
            int uAuto = ConfigConst.GCTurtorReacher;

            if (m_Request.Account.ExtIdentAccSet(newTutor) != REQUESTCODE.EXECUTE_SUCCESS)
            {
                MessageBox(m_Request.szErrMessage, "新建" + ConfigConst.GCTutorName + "失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE);
            }
            else
            {
                MessageBox("新建" + ConfigConst.GCTutorName + "成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK);
                return;
            }
        }
    }
Ejemplo n.º 13
0
    //项目列表
    private void InitrtList(string type)
    {
        string msg;

        RESEARCHTEST[] vrResult;
        UNIACCOUNT     acc = (UNIACCOUNT)Session["LOGIN_ACCINFO"];

        vrResult = GetrtList(type, out msg);
        if (vrResult != null)
        {
            for (int i = 0; i < vrResult.Length; i++)
            {
                bool isMyself = false;
                if (vrResult[i].dwHolderID == acc.dwAccNo || vrResult[i].dwLeaderID == acc.dwAccNo)
                {
                    isMyself = true;
                }
                int    num;
                string opera = GroupOperate(vrResult[i].RTMembers, acc.dwAccNo, vrResult[i].dwRTID, vrResult[i].dwGroupID, isMyself, out num);
                rtList += "<tr id='" + vrResult[i].dwRTID + "' ><td ><input type='hidden' class='courseId' value='" + vrResult[i].dwRTID + "'/>" + CutStrT(vrResult[i].szRTName, 16) + "</td><td >" + vrResult[i].szHolderName + "</td><td >" + vrResult[i].szLeaderName + "</td><td>" + vrResult[i].szFromUnit + "</td><td>"
                          + CutStrT(vrResult[i].szDeptName, 12) + "</td><td><input type='hidden' class='rtGroupId' value='" + vrResult[i].dwGroupID + "'/>" + num + "</td>" + opera + "</tr>";
            }
        }
        else
        {
            MsgBox(msg);
        }
    }
Ejemplo n.º 14
0
    public bool GetAccByAccno(string szAccno, out UNIACCOUNT acc, bool isSession)
    {
        acc = new UNIACCOUNT();
        REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL;

        if (Session["ALLACCOUNT"] == null)
        {
            ACCREQ vrGet = new ACCREQ();

            acc = new UNIACCOUNT();
            UNIACCOUNT[] vtRes;
            uResponse = m_Request.Account.Get(vrGet, out vtRes);
            if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && uResponse == REQUESTCODE.EXECUTE_SUCCESS)
            {
                Session["ALLACCOUNT"] = vtRes;
            }
        }
        UNIACCOUNT[] accList = (UNIACCOUNT[])Session["ALLACCOUNT"];
        for (int i = 0; i < accList.Length; i++)
        {
            if (accList[i].dwAccNo.ToString() == szAccno)
            {
                acc = accList[i];
                return(true);
            }
        }

        return(false);
    }
Ejemplo n.º 15
0
    private void showGroupMember(string id)
    {
        Bind        ddlBind   = new Bind();
        REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL;
        GROUPREQ    vrGroup   = new GROUPREQ();

        //vrGroup.dwGetType = (uint)GROUPREQ.DWGETTYPE.GROUPGET_BYID;
        //vrGroup.szGetKey = id;
        vrGroup.dwGroupID = ToUInt(id);
        UNIGROUP[] vtGroup;
        uResponse = m_Request.Group.GetGroup(vrGroup, out vtGroup);
        if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtGroup != null && vtGroup.Length > 0)
        {
            GROUPMEMBER[] vtGroupMember = vtGroup[0].szMembers;
            if (vtGroupMember != null && vtGroupMember.Length > 0)
            {
                memList = "";
                UNIACCOUNT acc = (UNIACCOUNT)Session["LOGIN_ACCINFO"];
                for (int i = 0; i < vtGroupMember.Length; i++)
                {
                    GROUPMEMBER mb = vtGroupMember[i];//Memo字段为帐号
                    memList += "<tr mbId='" + mb.szMemo + "' gId='" + mb.dwGroupID + "' kind='" + mb.dwKind + "'>";
                    memList += "<td>" + mb.szMemo + "</td>";
                    memList += "<td>" + mb.szName + "</td>";
                    memList += "<td>" + (acc.szLogonName == mb.szMemo ? "" : "[<span class='click' onclick='delMb(this);'>删除</span>]") + "</td>";
                    memList += "</tr>";
                }
            }
        }
    }
Ejemplo n.º 16
0
    private bool urlLogin()
    {
        string szUrl = Request.Url.ToString();

        if (!string.IsNullOrEmpty(szUrl) && szUrl.IndexOf("verify") > 0)
        {
            string szPassword  = "";
            string szLogonName = "";
            if (IsCheckLogin(szUrl, out szLogonName, out szPassword))
            {
                if (common.Login(szLogonName, szPassword))
                {
                    UNIACCOUNT curAcc = (UNIACCOUNT)Session["LOGIN_ACCINFO"];
                    if (curAcc.szEmail.ToString().Trim() == "" || curAcc.szHandPhone.ToString().Trim() == "")
                    {
                        MsgBox("新用户请先激活!");
                        common.ClearLogin();
                    }
                    else
                    {
                        return(true);
                    }
                }
            }
        }
        return(false);
    }
Ejemplo n.º 17
0
    private void InitLink()
    {
        UNIACCOUNT  acc = (UNIACCOUNT)Session["LOGIN_ACCINFO"];
        TESTPLANREQ req = new TESTPLANREQ();

        req.dwGetType  = (uint)TESTPLANREQ.DWGETTYPE.TESTPLANGET_BYTEACHER;
        req.szGetKey   = acc.dwAccNo.ToString();
        req.dwYearTerm = yearTerm.dwYearTerm;
        req.szReqExtInfo.szOrderKey  = "szCourseName";
        req.szReqExtInfo.szOrderMode = "ASC";
        UNITESTPLAN[] rlt;
        if (m_Request.Reserve.GetTestPlan(req, out rlt) == REQUESTCODE.EXECUTE_SUCCESS)
        {
            planLinkList = "{";
            for (int i = 0; i < rlt.Length; i++)
            {
                UNITESTPLAN plan = rlt[i];
                planLinkList += (i == 0 ? "'" : ",'") + plan.dwTestPlanID + "':'" + plan.szTestPlanName + "'";
            }
            planLinkList += "}";
        }
        else
        {
            MsgBox(m_Request.szErrMsg);
        }
    }
Ejemplo n.º 18
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["LOGIN_ACCINFO"] != null && IsLogined())
        {
            UNIACCOUNT vrAccInfo = (UNIACCOUNT)Session["LOGIN_ACCINFO"];

            szTrueName = vrAccInfo.szTrueName;
            logonName  = vrAccInfo.szLogonName;
            accNo      = vrAccInfo.dwAccNo.ToString();
            phone      = vrAccInfo.szHandPhone;
            email      = vrAccInfo.szEmail;
            ident      = vrAccInfo.dwIdent.ToString();
            tutorSta   = GetTutorCheckStatus();
            if ((Convert.ToUInt32(vrAccInfo.dwIdent) & (uint)UNIACCOUNT.DWIDENT.EXTIDENT_TUTOR) > 0)
            {
                bDisplay3 = "display";
            }
            else
            {
                bDisplay1 = "display";
            }
        }
        else
        {
            //bDisplay2 = "display";
        }
    }
Ejemplo n.º 19
0
    private void InitTooltip()
    {
        if (Session["LOGIN_ACCINFO"] == null)
        {
            return;
        }
        UNIACCOUNT acc = (UNIACCOUNT)Session["LOGIN_ACCINFO"];
        string     msg;
        int        num = 0;

        RESEARCHTEST[] rlt = GetrtList("rtest", out msg);
        if (rlt != null && rlt.Length > 0)
        {
            //临时方法,查询成员状态
            for (int j = 0; j < rlt.Length; j++)
            {
                RTMEMBER[] mbs = rlt[j].RTMembers;
                for (int m = 0; m < mbs.Length; m++)
                {
                    if (mbs[m].dwAccNo == acc.dwAccNo && ((mbs[m].dwStatus & 2) > 0))
                    {
                        num++;
                    }
                }
            }
        }
        tooltip += "<div class='tip'>已参与<span class='color3'> " + num + " </span>个科研项目。</div>";
    }
Ejemplo n.º 20
0
    protected void Page_Load(object sender, EventArgs e)
    {
        aluserid   = Request["userid"];
        wxuserid   = Request["wxuserid"];
        schoolCode = Request["schoolCode"];

        //Session["language"] = "en-gb";
        quickResv = ToUInt(GetConfig("quickResv"));
        if (LoadPage())
        {
            ADMINLOGINRES res = (ADMINLOGINRES)Session["LoginRes"];
            if ((res.dwManRole & (uint)ADMINLOGINRES.DWMANROLE.MANEXT_HP) == 0)
            {
                reLogin = true;//非手机端则重登录
            }
            UNIACCOUNT acc = (UNIACCOUNT)Session["LOGIN_ACCINFO"];
            if ((ToUInt(GetConfig("availMobile")) & 8) > 0)
            {
                if ((acc.dwIdent & (uint)UNIACCOUNT.DWIDENT.EXTIDENT_MANAGER) > 0)
                {
                    isMark = true;
                }
            }
        }
        else if (GetConfig("loginAll") == "1")
        {//上财pad屏幕要求单点登录,临时注释
            //Response.Redirect("~/loginMAll.aspx");
            Response.Redirect("~/loginAll.aspx");
        }
        InitSubsys();
    }
Ejemplo n.º 21
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["LOGIN_ACCINFO"] != null)
        {
            UNIACCOUNT acc = (UNIACCOUNT)Session["LOGIN_ACCINFO"];
            ACCREQ     req = new ACCREQ();
            req.dwAccNo = acc.dwAccNo;
            UNIACCOUNT[] rlt;
            if (m_Request.Account.Get(req, out rlt) == REQUESTCODE.EXECUTE_SUCCESS && rlt.Length > 0)
            {
                Session["LOGIN_ACCINFO"] = curAcc = rlt[0];
                if (GetConfig("needChangePsw") == "1" && curAcc.szLogonName.ToLower() != "staadmin001" && curAcc.szLogonName.ToLower() != "sysadmin")
                {
                    changePsw = "";
                }
                if ((rlt[0].dwKind & (uint)UNIACCOUNT.DWKIND.EXTKIND_NOMSG) > 0)
                {
                    checkAlert = "";
                }
            }
        }
        string szMustAct = GetConfig("mustAct");

        if (szMustAct == "1" || szMustAct == "4")
        {
            msgMustAct   = "required,";
            msgFontColor = "red";
        }
        if (szMustAct == "1" || szMustAct == "3")
        {
            emailMustAct   = "required,";
            emailFontColor = "red";
        }
    }
Ejemplo n.º 22
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (ToUInt(GetConfig("openActivity")) > 0 && ToUInt(GetConfig("centerActivity")) == 0)
     {
         centerActivity = true;
     }
     if (LoadPage())
     {
         acc = (UNIACCOUNT)Session["LOGIN_ACCINFO"];
         uint start = ToUInt(DateTime.Now.AddMonths(-3).ToString("yyyyMMdd"));
         uint end   = ToUInt(DateTime.Now.AddMonths(12).ToString("yyyyMMdd"));
         if (ToUInt(GetConfig("openActivity")) > 0)
         {
             InitOpenAty(start);
         }
         InitResv(start, end);
         if (GetConfig("userCredit") == "1")
         {
             InitCreditRec();
         }
         InitUseInfo();
         hideTab = Request["hide_tab"];
     }
     else
     {
         MsgBoxH(Translate("未登录或登录超时,请重新登录"), "location.reload();");
     }
 }
Ejemplo n.º 23
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.LoadPage();
        string url = "index.aspx";

        if (ConfigurationManager.AppSettings["mustLogin"] == "1")
        {
            url = "Login.aspx";
        }
        if (IsLogined())
        {
            vrAccInfo = (UNIACCOUNT)Session["LOGIN_ACCINFO"];
            if (GetConfig("needChangePsw") == "1" && vrAccInfo.szLogonName.ToLower() != "staadmin001" && vrAccInfo.szLogonName.ToLower() != "sysadmin")
            {
                changePsw = "";
            }
        }
        else
        {
            Response.Redirect(url);
        }
        if (!IsPostBack)
        {
            GetResv();
        }
        GetBreakResv();
    }
Ejemplo n.º 24
0
    Device_DevLogout()
    {
        DEVREGISTRES vrDevRegistRes = new DEVREGISTRES();
        UNIACCOUNT   AccInfo        = new UNIACCOUNT();

        if (Context.Session != null)
        {
            if (Context.Session["SessionID"] != null)
            {
                soaphead.SessionID = (uint)Context.Session["SessionID"];
                soaphead.StationSN = (uint)Context.Session["StationSN"];
                if (Context.Session["DevRegist"] != null)
                {
                    vrDevRegistRes = (DEVREGISTRES)Context.Session["DevRegist"];
                }
                if (Context.Session["DevAccInfo"] != null)
                {
                    AccInfo = (UNIACCOUNT)Context.Session["DevAccInfo"];
                }
            }
        }
        DEVLOGOUTREQ vrParameter = new DEVLOGOUTREQ();

        vrParameter.dwDevID = vrDevRegistRes.dwDevID;
        vrParameter.dwLabID = vrDevRegistRes.dwLabID;
        vrParameter.dwAccNo = AccInfo.dwAccNo;
        vrParameter.dwParam = 1;

        Device_DevLogoutResult ret       = new Device_DevLogoutResult();
        UniRequest             m_Request = GetRequest();
        REQUESTCODE            uResponse = REQUESTCODE.DBERR_OPENFAIL;

        ret.code = 2;

        uResponse   = m_Request.Device.DevLogout(vrParameter, out ret.vrRes);
        ret.Message = m_Request.szErrMsg;

        if (uResponse != REQUESTCODE.EXECUTE_SUCCESS)
        {
            ret.code = 1;
            return(ret);
        }


        if ((object)ret.vrRes == null)
        {
            Trace("vrResult == null");
            ret.code = 1;
            return(ret);
        }

        uint   code2;
        string Message2;

        Release(out code2, out Message2);

        ret.code = 0;
        return(ret);
    }
Ejemplo n.º 25
0
    protected void Page_Load(object sender, EventArgs e)
    {
        USERECREQ vrParameter = new USERECREQ();
        string    szPID       = Request["dwPID"];

        DEVUSEREC[] vrResult;
        GetPageCtrlValue(out vrParameter.szReqExtInfo);
        if (!IsPostBack)
        {
            dwStartDate.Value = DateTime.Now.AddMonths(-1).ToString("yyyy-MM-dd");
            dwEndDate.Value   = DateTime.Now.ToString("yyyy-MM-dd");
        }
        vrParameter.dwStartDate = DateToUint(dwStartDate.Value);
        vrParameter.dwEndDate   = DateToUint(dwEndDate.Value);
        string szKey = Request["szGetKey"];

        if (szKey != null && szKey != "")
        {
            //vrParameter.dwGetType = (uint)REPORTREQ.DWGETTYPE.USERECGET_BYDEVID;
            vrParameter.dwDevID = Parse(szKey);
        }
        else
        {
            //vrParameter.dwGetType = (uint)REPORTREQ.DWGETTYPE.USERECGET_BYALL;
        }
        if (vrParameter.szReqExtInfo.szOrderKey == null || vrParameter.szReqExtInfo.szOrderKey == "")
        {
            vrParameter.szReqExtInfo.szOrderKey  = "dwBeginTime";
            vrParameter.szReqExtInfo.szOrderMode = "desc";
        }
        vrParameter.dwClassKind = (uint)UNIDEVCLS.DWKIND.CLSKIND_LOAN;
        UNIACCOUNT account = new UNIACCOUNT();

        if (szPID != null && GetAccByLogonName(szPID, out account))
        {
            vrParameter.dwAccNo = account.dwAccNo;
        }
        vrParameter.dwPurpose = (uint)UNIRESERVE.DWPURPOSE.USEFOR_LOAN;
        if (m_Request.Report.GetUseRec(vrParameter, out vrResult) == REQUESTCODE.EXECUTE_SUCCESS)
        {
            for (int i = 0; i < vrResult.Length; i++)
            {
                m_szOut += "<tr>";
                m_szOut += "<td>" + vrResult[i].szDevName.ToString() + "</td>";
                m_szOut += "<td>" + vrResult[i].szKindName + "</td>";
                m_szOut += "<td>" + vrResult[i].szModel + "</td>";
                m_szOut += "<td>" + vrResult[i].szSpecification + "</td>";
                m_szOut += "<td>" + vrResult[i].szLabName + "</td>";
                m_szOut += "<td>" + vrResult[i].szTrueName + "(" + vrResult[i].szPID + ")" + "</td>";
                m_szOut += "<td>" + vrResult[i].szDeptName + "</td>";
                m_szOut += "<td>" + Get1970Date(vrResult[i].dwBeginTime, "MM-dd HH:mm") + "-" + Get1970Date(vrResult[i].dwEndTime, "MM-dd HH:mm") + "</td>";
                m_szOut += "<td>" + GetMinToStr(vrResult[i].dwUseTime) + "</td>";
                m_szOut += "</tr>";
            }
            UpdatePageCtrl(m_Request.Report);
        }

        PutBackValue();
    }
Ejemplo n.º 26
0
    Admin_StaLogin(ADMINLOGINREQ vrParameter)
    {
        if (Context.Session != null)
        {
            if (Context.Session["SessionID"] != null)
            {
                soaphead.SessionID = (uint)Context.Session["SessionID"];
                soaphead.StationSN = (uint)Context.Session["StationSN"];
            }
        }

        vrParameter.dwStaSN     = 0;
        vrParameter.dwLoginRole = 4;
        vrParameter.szVersion   = ((uint)ADMINLOGINREQ.SZVERSION.INTVER_MAIN).ToString() + "." + ((uint)ADMINLOGINREQ.SZVERSION.INTVER_RELEASE).ToString("00") + "." + ((uint)ADMINLOGINREQ.SZVERSION.INTVER_INTERNAL).ToString();
        vrParameter.szPassword  = "******" + vrParameter.szPassword;
        Admin_StaLoginResult ret       = new Admin_StaLoginResult();
        UniRequest           m_Request = GetRequest();
        REQUESTCODE          uResponse = REQUESTCODE.DBERR_OPENFAIL;

        ret.code = 2;

        uResponse   = m_Request.Admin.StaLogin(vrParameter, out ret.vrRes);
        ret.Message = m_Request.szErrMsg;

        if (uResponse != REQUESTCODE.EXECUTE_SUCCESS)
        {
            ret.code = 1;
            return(ret);
        }


        if ((object)ret.vrRes == null)
        {
            Trace("vrResult == null");
            ret.code = 1;
            return(ret);
        }

        if (Context.Session != null)
        {
            Context.Session["SessionID"] = ret.vrRes.dwSessionID;
            Context.Session["StationSN"] = vrParameter.dwStaSN;
            UNIACCOUNT acc = new UNIACCOUNT();
            acc.dwAccNo                = ret.vrRes.AdminInfo.dwAccNo;
            acc.dwIdent                = ret.vrRes.AdminInfo.dwIdent;
            acc.dwStatus               = ret.vrRes.AdminInfo.dwStatus;
            acc.szEmail                = ret.vrRes.AdminInfo.szEmail;
            acc.szHandPhone            = ret.vrRes.AdminInfo.szHandPhone;
            acc.szLogonName            = ret.vrRes.AdminInfo.szLogonName;
            acc.szMemo                 = ret.vrRes.AdminInfo.szMemo;
            acc.szTel                  = ret.vrRes.AdminInfo.szTel;
            acc.szTrueName             = ret.vrRes.AdminInfo.szTrueName;
            Context.Session["AccInfo"] = acc;
        }

        ret.code = 0;
        return(ret);
    }
Ejemplo n.º 27
0
    protected string GetdataList()
    {
        REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL;

        TESTDATAREQ vrReq = new TESTDATAREQ();

        vrReq.dwStartDate = (uint)int.Parse(DateTime.Now.AddMonths(-6).ToString("yyyyMMdd"));
        vrReq.dwEndDate   = (uint)int.Parse(DateTime.Now.AddMonths(1).ToString("yyyyMMdd"));
        UNIACCOUNT AccInfo = (UNIACCOUNT)Session["LOGIN_ACCINFO"];

        //vrReq.dwAccNo = 256491;
        vrReq.dwStatus = (uint)UNITESTDATA.DWSTATUS.TDSTAT_UPLOADED | (uint)UNITESTDATA.DWSTATUS.TDSTAT_DOWNLOADED;
        vrReq.szReqExtInfo.szOrderKey  = "dwSubmitDate";
        vrReq.szReqExtInfo.szOrderMode = "DESC";
        UNITESTDATA[] vtResult;
        uResponse = m_Request.Account.TestDataGet(vrReq, out vtResult);
        if (uResponse != REQUESTCODE.EXECUTE_SUCCESS)
        {
            string szErrMsg = "获取失败:" + m_Request.szErrMessage;
            return(szErrMsg);
        }
        else
        {
            string szHtml = "";
            if (vtResult.Length == 0)
            {
                szHtml = "<tr><td colspan='10' style='padding:10px;width:100%;text-align:center;'>无上传记录,列表为空</td></tr>";
            }
            else
            {
                szHtml = "";
                for (int i = 0; i < vtResult.Length; i++)
                {
                    uint   dwSubmitDate = (uint)vtResult[i].dwSubmitDate;
                    string szDate       = (dwSubmitDate / 10000) + "-" + ((dwSubmitDate / 100) % 100) + "-" + (dwSubmitDate % 100) + " " + Get1970Time((uint)vtResult[i].dwSubmitTime);
                    if (i % 2 == 0)
                    {
                        szHtml += "<tr class='odd'>";
                    }
                    else
                    {
                        szHtml += "<tr>";
                    }
                    szHtml += "<td class='tbltd'>" + vtResult[i].szDisplayName.ToString() + "</td>";
                    szHtml += "<td class='tbltd'>" + vtResult[i].szTrueName + "</td>";
                    szHtml += "<td class='tbltd'>" + szDate + "</td>";
                    szHtml += "<td class='tbltd'>" + vtResult[i].szDevName.ToString() + "</td>";
                    szHtml += "<td class='tbltd'>" + ConvertSize(vtResult[i].dwFileSize) + "</td>";
                    szHtml += "<td class='tbltd status' stat='" + vtResult[i].dwStatus + "'>" + ConvertSta(vtResult[i].dwStatus) + "</td>";
                    szHtml += "<td class='tbltd'><a class='click' onclick='window.open(\"dlData.aspx?id=" + vtResult[i].dwSID.ToString() + "\");setTimeout(\"location.href=location.href;\",500);'>下载</a> | " +
                              "<a class='click' onclick='delAct(\"del_data\",\"" + vtResult[i].dwSID.ToString() + "\")'>删除</a></td>";
                    szHtml += "</tr>";
                }
            }
            return(szHtml);
        }
    }
Ejemplo n.º 28
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string szTerm      = Request["term"];
        string szType      = Request["Type"];
        string szHandPhone = Request["handphone"];
        string szEmail     = Request["email"];

        Response.CacheControl = "no-cache";

        ACCREQ vrGet = new ACCREQ();

        UNIACCOUNT[] vtAccount;
        if (szType == null || szType == "")
        {
            vrGet.szTrueName = szTerm;
            // vrGet.dwGetType = (uint)ACCREQ.DWGETTYPE.ACCGET_BYTRUENAME;
        }
        else if (szType.ToLower() == "logonname")
        {
            vrGet.szPID = szTerm;// (uint)ACCREQ.DWGETTYPE.ACCGET_BYLOGONNAME;
        }

        uint dwIdent = ToUint(Request["dwIdent"]);

        if (Request["dwIdent"] != null && dwIdent != 0)
        {
            vrGet.dwIdent = dwIdent;
        }

        // vrGet.szGetID = szTerm;
        vrGet.szReqExtInfo.dwNeedLines = 10; //最多10条

        if (m_Request.Account.Get(vrGet, out vtAccount) == REQUESTCODE.EXECUTE_SUCCESS && vtAccount != null)
        {
            UNIACCOUNT setAccount = new UNIACCOUNT();
            setAccount = vtAccount[0];
            if (szHandPhone != null)
            {
                setAccount.szHandPhone = szHandPhone;
            }
            if (szEmail != null)
            {
                setAccount.szEmail = szEmail;
            }
            if (m_Request.Account.Set(setAccount, out setAccount) == REQUESTCODE.EXECUTE_SUCCESS)
            {
                Response.Write("success");
            }
            else
            {
                Response.Write(m_Request.szErrMessage);
            }
        }
        else
        {
        }
    }
Ejemplo n.º 29
0
    Device_DevLogon(DEVLOGONREQ vrParameter)
    {
        DEVREGISTRES vrDevRegistRes = new DEVREGISTRES();

        if (Context.Session != null)
        {
            if (Context.Session["SessionID"] != null)
            {
                soaphead.SessionID = (uint)Context.Session["SessionID"];
                soaphead.StationSN = (uint)Context.Session["StationSN"];
                vrDevRegistRes     = (DEVREGISTRES)Context.Session["DevRegist"];
            }
        }
        vrParameter.dwDevID     = vrDevRegistRes.dwDevID;
        vrParameter.dwLabID     = vrDevRegistRes.dwLabID;
        vrParameter.dwLogonType = (uint)DEVLOGONREQ.DWLOGONTYPE.LOGONTYPE_USER;
        vrParameter.szPasswd    = "P" + vrParameter.szPasswd;
        Device_DevLogonResult ret       = new Device_DevLogonResult();
        UniRequest            m_Request = GetRequest();
        REQUESTCODE           uResponse = REQUESTCODE.DBERR_OPENFAIL;

        ret.code = 2;

        uResponse   = m_Request.Device.DevLogon(vrParameter, out ret.vrRes);
        ret.Message = m_Request.szErrMsg;

        if (uResponse != REQUESTCODE.EXECUTE_SUCCESS)
        {
            ret.code = 1;
            return(ret);
        }


        if ((object)ret.vrRes == null)
        {
            Trace("vrResult == null");
            ret.code = 1;
            return(ret);
        }

        if (Context.Session != null)
        {
            try
            {
                Context.Session["DevAccInfo"] = ret.vrRes.szAccInfo;
                UNIACCOUNT accno = (UNIACCOUNT)Context.Session["DevAccInfo"];
            }
            catch
            {
                Logger.trace("loginres非uniaccount");
            }
        }

        ret.code = 0;
        return(ret);
    }
Ejemplo n.º 30
0
    private void InitRTResv(uint startDate, uint endDate)
    {
        REQUESTCODE uResponse    = REQUESTCODE.DBERR_FAILED;
        RTRESVREQ   vrGet        = new RTRESVREQ();
        UNIACCOUNT  vrAccInfo    = (UNIACCOUNT)Session["LOGIN_ACCINFO"];
        uint?       accno        = vrAccInfo.dwAccNo;
        uint        intStartTime = startDate;
        uint        intEndTime   = endDate;

        vrGet.dwMAccNo = accno;
        //vrGet.dwTutorID = acc;
        vrGet.dwBeginDate = intStartTime;
        vrGet.dwEndDate   = intEndTime;
        //vrGet.dwUnNeedStat = (int)UNIRESERVE.DWSTATUS.RESVSTAT_DONE;
        vrGet.szReqExtInfo.szOrderKey  = "dwOccurTime";
        vrGet.szReqExtInfo.szOrderMode = "DESC";
        RTRESV[] vtResult;
        uResponse = m_Request.Reserve.GetRTResv(vrGet, out vtResult);
        if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtResult != null)
        {
            for (int i = 0; i < vtResult.Length; i++)
            {
                RTRESV resv = vtResult[i];
                rtRsvList += "<tr>";
                rtRsvList += "<td class='f-tl'>" + CutStrT(resv.szRTName, 12) + "<span class='color1'  title='主持人:" + resv.szHolderName + "; 负责人:" + resv.szLeaderName + "'>.详细</span></td><td>" + resv.szOwnerName + "</td><td class='f-tl'>" + CutStrT(resv.szDevName, 12) + "</td>";
                rtRsvList += "<td class='f-tl'>" + CutStrT(resv.szTestName, 14) + "</td>";
                rtRsvList += "<td>" + Get1970Date((int)resv.dwOccurTime).Substring(5) + "</td>";
                string begin = Get1970Date(Convert.ToInt32(resv.dwBeginTime));
                rtRsvList += "<td>" + begin.Substring(5) + "</td>";
                string end     = Get1970Date(Convert.ToInt32(resv.dwEndTime));
                string endtime = end.Substring(5);
                string rsvStr  = endtime;
                uint   usetime = 0;
                if (IsStat(resv.dwStatus, (uint)UNIRESERVE.DWSTATUS.RESVSTAT_DOING))
                {
                    usetime = GetRTestRsvTime(resv.dwLabID, resv.dwRTID);
                    rsvStr  = "<div class='time'><div><span>" + endtime + "</span></div><div>[<span class='click' onclick='alterRsv(this);'>修改</span>]</div></div>" +
                              "<div class='alter' style='display:none;'><div><input type='text' class='Wdate' style='width:60px;' value='" + endtime.Substring(6) + "' title='剩余可用时长:" + usetime + "分钟'/></div><div><span class='click' onclick='subAlter(this);'>提交</span> | <span class='click' onclick='back(this);'>返回</span></div></div>";
                }
                rtRsvList += "<td rsvId='" + resv.dwResvID + "' start='" + Get1970Date((int)resv.dwBeginTime) + "' end='" + Get1970Date((int)resv.dwEndTime) + "' valid='" + usetime + "'>" + rsvStr + "</td>";
                string szState = Util.Converter.ResvStatusConverter(resv.dwStatus);
                rtRsvList += "<td>" + szState + "</td>";
                string act = "";
                if (((resv.dwStatus & (uint)UNIRESERVE.DWSTATUS.RESVSTAT_UNDO) > 0) && (resv.dwOwner == accno))
                {
                    act += "[<a class='click' rsvId='" + resv.dwResvID + "' onclick='delRsv(this)'>删除</a>]<br/>";
                }
                if (act == "")
                {
                    act = "无";
                }
                rtRsvList += "<td>" + act + "</td></tr>";
            }
        }
    }