Esempio n. 1
0
    private void InitResvRec()
    {
        string     start = Request["start"];
        string     end   = Request["end"];
        RESVRECREQ req   = new RESVRECREQ();

        req.dwGetType   = (uint)RESVRECREQ.DWGETTYPE.RESVRECGET_BYID;
        req.dwStartDate = ToUInt(start);
        req.dwEndDate   = ToUInt(end);
        req.szGetKey    = resvId;
        UNIRESVREC[] rlt;
        if (m_Request.Report.ResvRecGet(req, out rlt) == REQUESTCODE.EXECUTE_SUCCESS)
        {
            for (int i = 0; i < rlt.Length; i++)
            {
                UNIRESVREC rec = rlt[i];
                attend_list += "<tr><td>" + (i + 1) + "</td><td>" + rec.szTrueName + "</td><td>" + rec.szPID + "</td><td>" + rec.szDevName + "</td><td>" + Util.Converter.GetAttendState(rec.dwStatus) + "</td></tr>";
            }
        }
    }
Esempio n. 2
0
    private string GetAttend(uint?accno)
    {
        string ret = "";

        if (recs != null)
        {
            int need_num   = 0; //应到
            int sign_num   = 0; //已到
            int leave_num  = 0; //请假
            int unsign_num = 0; //未到
            int late_num   = 0; //迟到
            int early_num  = 0; //早退
            for (int i = 0; i < recs.Length; i++)
            {
                UNIRESVREC rec = recs[i];
                if (accno == rec.dwAccNo)
                {
                    need_num++;
                    if (IsStat(rec.dwStatus, (uint)UNIRESVREC.DWSTATUS.RESVRECSTAT_SIGNED | (uint)UNIRESVREC.DWSTATUS.RESVRECSTAT_ATTEND))
                    {
                        sign_num++;
                    }
                    if (IsStat(rec.dwStatus, (uint)UNIRESVREC.DWSTATUS.RESVRECSTAT_UNSIGN | (uint)UNIRESVREC.DWSTATUS.RESVRECSTAT_ABSENT))
                    {
                        unsign_num++;
                    }
                    if (IsStat(rec.dwStatus, (uint)UNIRESVREC.DWSTATUS.RESVRECSTAT_SICK) || IsStat(rec.dwStatus, (uint)UNIRESVREC.DWSTATUS.RESVRECSTAT_PRIVATE))
                    {
                        leave_num++;
                    }
                }
            }
            ret = "应到:<code>" + need_num + "</code> 实到:<code>" + sign_num + "</code> 请假:<code>" + leave_num + "</code>";
        }
        return(ret);
    }