private void InitCreditRec() { if (Session["LOGIN_ACCINFO"] == null) { return; } UNIACCOUNT acc = (UNIACCOUNT)Session["LOGIN_ACCINFO"]; //信用记录 CREDITREC[] list = GetCreditRecByAccNo(acc.dwAccNo); if (list != null) { for (int i = 0; i < list.Length; i++) { CREDITREC rec = list[i]; //处罚 string punish = "<span class='grey uni_trans'>不处罚</span>"; string location = string.IsNullOrEmpty(rec.szDevName)?Translate("未签到使用"):rec.szLabName + "," + rec.szDevName; if ((rec.dwUserCStat & (uint)CREDITREC.DWUSERCSTAT.USERCSTAT_VALID) > 0 && rec.dwForbidStartDate != null && rec.dwForbidEndDate != 0) { punish = "<span class='red uni_trans'>禁止预约</span>:" + ToDate(rec.dwForbidStartDate) + Translate("至") + ToDate(rec.dwForbidEndDate); } creditrec += "<li class='item-content'>" + "<div class='item-inner'>" + "<div class='item-title-row'>" + "<div class='item-title'>" + rec.szCTName + "/" + rec.szCreditName + "</div>" + "<div class='item-after'>" + Util.Converter.GetCreditRecState(rec.dwUserCStat) + "</div></div>" + "<div class='item-subtitle'>" + Translate("扣") + rec.dwThisUseCScore + Translate("分") + " (" + Get1970Date((int)rec.dwOccurTime) + ")</div>" + "<div class='item-text'>" + location + "<br/>" + punish + "</div></div></li>"; } } //个人信用 proacc pacc = common.ToProAcc(acc); if (pacc.credit != null) { for (int i = 0; i < pacc.credit.Length; i++) { string[] arr = pacc.credit[i]; string left = ToUInt(arr[2]) > ToUInt(arr[1])?arr[1]:arr[2]; detail += "<tr><td>" + arr[0] + "</td><td class='text-center'>" + left + "</td><td class='text-center'>" + arr[2] + "</td></tr>"; } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["LOGIN_ACCINFO"] != null && IsClientLogin()) { curAcc = (UNIACCOUNT)Session["LOGIN_ACCINFO"]; proacc = common.ToProAcc(curAcc); credit = "["; if (proacc.credit != null) { for (int i = 0; i < proacc.credit.Length; i++) { string[] arr = proacc.credit[i]; credit += (i > 0?",":"") + "["; if (arr.Length > 3) { uint uLeftScore = 0; uint uMaxScore = 0; uint.TryParse(arr[1], out uLeftScore); uint.TryParse(arr[2], out uMaxScore); if (uLeftScore > uMaxScore) { arr[2] = arr[1]; } } for (int j = 0; j < arr.Length; j++) { if (j > 0) { credit += ","; } else { } credit += "\"" + arr[j] + "\""; } credit += "]"; } } credit += "]"; //return; //ADMINLOGINRES res = (ADMINLOGINRES)Session["LoginRes"]; //role = res.dwManRole.ToString(); //curAcc = (UNIACCOUNT)Session["LOGIN_ACCINFO"]; //szTrueName = curAcc.szTrueName; //logonName = curAcc.szLogonName; //accNo = curAcc.dwAccNo.ToString(); //phone = curAcc.szHandPhone; //email = curAcc.szEmail; //ident = curAcc.dwIdent.ToString(); //dept = curAcc.szDeptName; //tutorAccNo = curAcc.dwTutorID.ToString(); //tutorName = curAcc.szTutorName; ////科研 //if (GetConfig("proTarget") == "" || (Convert.ToUInt32(GetConfig("proTarget")) & 4) > 0)//未定义或定义需要科研信息 //{ // tutorSta = GetTutorCheckStatus(); // rtestSta = GetRtestStatus(); // property = GetProperty(); //} ////信用积分 //creditScore = GetCredit(); } }