public static CHECKTYPE GetCHECKTYPEByID(int id) { CHECKTYPE cHECKTYPE = new CHECKTYPE(); SqlCHECKTYPEProvider sqlCHECKTYPEProvider = new SqlCHECKTYPEProvider(); cHECKTYPE = sqlCHECKTYPEProvider.GetCHECKTYPEByID(id); return(cHECKTYPE); }
private void DelLab(string szID) { REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; CHECKTYPE delValue = new CHECKTYPE(); delValue.dwCheckKind = Parse(szID); //uResponse=m_Request.Admin.adm(lab); if (uResponse != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "提示", MSGBOX.ERROR); } }
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); }
public int InsertCHECKTYPE(CHECKTYPE cHECKTYPE) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("AbiMatuEnterprise_InsertCHECKTYPE", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@CHECKTYPEID", SqlDbType.Int).Direction = ParameterDirection.Output; cmd.Parameters.Add("@CHKTYPE", SqlDbType.VarChar).Value = cHECKTYPE.CHKTYPE; cmd.Parameters.Add("@CHKRATE", SqlDbType.Int).Value = cHECKTYPE.CHKRATE; cmd.Parameters.Add("@CHKROUTING", SqlDbType.VarChar).Value = cHECKTYPE.CHKROUTING; cmd.Parameters.Add("@CHKACCOUNT", SqlDbType.VarChar).Value = cHECKTYPE.CHKACCOUNT; connection.Open(); int result = cmd.ExecuteNonQuery(); return((int)cmd.Parameters["@CHECKTYPEID"].Value); } }
private bool GetCheckType(uint uID, out CHECKTYPE setValue, CHECKTYPE[] vtCheck) { setValue = new CHECKTYPE(); if (vtCheck == null || vtCheck.Length == 0) { return(false); } for (int i = 0; i < vtCheck.Length; i++) { if ((uint)vtCheck[i].dwCheckKind == uID) { setValue = vtCheck[0]; return(true); } } return(false); }
public CHECKTYPE GetCHECKTYPEFromReader(IDataReader reader) { try { CHECKTYPE cHECKTYPE = new CHECKTYPE ( (int)reader["CHECKTYPEID"], reader["CHKTYPE"].ToString(), (int)reader["CHKRATE"], reader["CHKROUTING"].ToString(), reader["CHKACCOUNT"].ToString() ); return(cHECKTYPE); } catch (Exception ex) { return(null); } }
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 = "审核"; } }
private REQUESTCODE CheckByResvID(string szResvID, uint?uCheckState, string szMemo) { REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; YARDRESVCHECKINFOREQ vrPar = new YARDRESVCHECKINFOREQ(); vrPar.dwResvID = Parse(szResvID); vrPar.dwCheckStat = (uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_CANDO; vrPar.dwNeedYardResv = 1; YARDRESVCHECKINFO[] vtRes; uResponse = m_Request.Reserve.GetYardResvCheckInfo(vrPar, out vtRes); REQUESTCODE bRes = REQUESTCODE.EXECUTE_FAIL; if (uResponse == REQUESTCODE.EXECUTE_SUCCESS == vtRes.Length > 0) { for (int i = 0; i < vtRes.Length; i++) { if (!((vtRes[i].dwCheckStat & (uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_CANDO) > 0)) { continue; } ADMINLOGINRES accno = (ADMINLOGINRES)Session["LoginResult"]; if (accno.AccInfo.dwAccNo != null && (accno.AccInfo.dwDeptID != vtRes[i].dwCheckDeptID)) { //continue; } CHECKTYPE checktype = new CHECKTYPE(); if (GetCheckType((uint)vtRes[i].dwCheckKind, out checktype)) { if ((checktype.dwMainKind & (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_SERVICE) > 0) { continue; } } else { continue; } YARDRESVCHECK setValue = new YARDRESVCHECK(); setValue.dwCheckID = vtRes[i].dwCheckID; setValue.dwCheckKind = vtRes[i].dwCheckKind; setValue.dwResvID = vtRes[i].dwResvID; setValue.YardResv = vtRes[i].YardResv; setValue.YardResv.dwActivityLevel = Parse(Request["dwActivityLevel"]); setValue.YardResv.dwSecurityLevel = Parse(Request["dwSecurityLevel"]); setValue.YardResv.dwCheckKinds = Parse(Request["dwDirectors"]); setValue.szCheckDetail = Request["szCheckInfo"]; string szDevID = Request["devID"]; if (szDevID != null && szDevID != "") { UNIDEVICE dev; if (getDevByID(szDevID, out dev)) { setValue.YardResv.dwDevID = dev.dwDevID; setValue.YardResv.dwDevKind = dev.dwKindID; setValue.YardResv.dwDevSN = dev.dwDevSN; setValue.YardResv.szDevName = dev.szDevName; setValue.YardResv.dwLabID = dev.dwLabID; setValue.YardResv.dwRoomID = dev.dwRoomID; setValue.YardResv.szRoomName = dev.szRoomName; } YARDRESVREQ vrYardGet = new YARDRESVREQ(); vrYardGet.dwResvID = vtRes[i].dwResvID; YARDRESV[] vtYardResv; if (m_Request.Reserve.GetYardResv(vrYardGet, out vtYardResv) == REQUESTCODE.EXECUTE_SUCCESS && vtYardResv != null && vtYardResv.Length > 0) { YARDRESV setYardResv = new YARDRESV(); setYardResv = vtYardResv[i]; setYardResv.dwDevID = dev.dwDevID; m_Request.Reserve.SetYardResv(setYardResv, out setYardResv); } } setValue.dwCheckStat = uCheckState; setValue.szCheckDetail = szMemo; uResponse = m_Request.Reserve.YardResvCheck(setValue); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS) { bRes = REQUESTCODE.EXECUTE_SUCCESS; } } return(bRes); } return(REQUESTCODE.EXECUTE_FAIL); }
public static bool UpdateCHECKTYPE(CHECKTYPE cHECKTYPE) { SqlCHECKTYPEProvider sqlCHECKTYPEProvider = new SqlCHECKTYPEProvider(); return(sqlCHECKTYPEProvider.UpdateCHECKTYPE(cHECKTYPE)); }
public static int InsertCHECKTYPE(CHECKTYPE cHECKTYPE) { SqlCHECKTYPEProvider sqlCHECKTYPEProvider = new SqlCHECKTYPEProvider(); return(sqlCHECKTYPEProvider.InsertCHECKTYPE(cHECKTYPE)); }
private void InitYardResv(uint start, uint end) { YARDRESVREQ req = new YARDRESVREQ(); req.dwBeginDate = start; req.dwEndDate = end; req.dwApplicantID = acc.dwAccNo; req.szReqExtInfo.szOrderKey = "dwResvGroupID DESC,OccurTime"; req.szReqExtInfo.szOrderMode = "ASC"; //req.dwReqProp = (uint)YARDRESVREQ.DWREQPROP.YARDREQ_ONLYMAINRESV; req.dwStatFlag = (uint)RESVREQ.DWSTATFLAG.STATFLAG_OVER | (uint)RESVREQ.DWSTATFLAG.STATFLAG_INUSE | (uint)RESVREQ.DWSTATFLAG.STATFLAG_CHECKFAIL; YARDRESV[] rlt; if (m_Request.Reserve.GetYardResv(req, out rlt) == REQUESTCODE.EXECUTE_SUCCESS) { CHECKTYPE[] mantypes = GetCheckType(null, (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_DEVMAN); CHECKTYPE[] dicttypes = GetCheckType(null, (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_DIRECTOR); CHECKTYPE[] servtypes = GetCheckType(null, (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_SERVICE); //获取服务列表 for (int i = 0; i < servtypes.Length; i++) { svcArray += servtypes[i].dwCheckKind + ","; } if (svcArray.Length > 0) { svcArray = svcArray.Substring(0, svcArray.Length - 1); } // string delList = ""; for (int i = 0; i < rlt.Length; i++) { YARDRESV resv = rlt[i]; string groupId = resv.dwResvGroupID.ToString(); bool over = (resv.dwStatus & (uint)UNIRESERVE.DWSTATUS.RESVSTAT_DONE) > 0; //预约明细 if (i == 0 || rlt[i - 1].dwResvGroupID != resv.dwResvGroupID) { delList = resv.dwResvID.ToString(); timeDetail += (i == 0 ? "" : "</tbody></table></div>") + "<div id='timedetail_" + groupId + "'><table class='timedetail_info state_info uni_sort_tbl'><thead><tr><th class='sort_asc'>时间</th></tr></thead><tbody>"; //timeDetail += (i == 0 ? "" : "</tbody></table></div>") + "<div id='timedetail_" + groupId + "'><table class='timedetail_info state_info uni_sort_tbl'><thead><tr><th>预约号</th><th class='sort_asc'>时间</th><th>状态</th><th class='no_sort'>操作</th></tr></thead><tbody>"; } else { delList += "," + resv.dwResvID; } timeDetail += "<tr class='tdetail_tr_" + resv.dwResvID + "'><td>" + Get1970Date((int)resv.dwBeginTime) + "至" + Get1970Date((int)resv.dwEndTime).Substring(11) + "</td></tr>" + (i == rlt.Length - 1 ? "</tbody></table></div>" : ""); // timeDetail += "<tr class='tdetail_tr_"+resv.dwResvID+"'><td>" + resv.dwResvID + "</td><td>" + Get1970Date((int)resv.dwBeginTime) + "至" + Get1970Date((int)resv.dwEndTime).Substring(11) + "</td><td>" + Util.Converter.ResvStatusConverter(resv.dwStatus) + "</td>" + //"<td class='text-center resv_act'>" + GetResvAct(resv) + "</td></tr>" + (i == rlt.Length - 1 ? "</tbody></table></div>" : ""); if (i < rlt.Length - 1 && rlt[i + 1].dwResvGroupID == resv.dwResvGroupID)//非同组最后一个 { continue; } string timespan = resv.szCycRule; bool isCycle = true; if (i == 0 || rlt[i - 1].dwResvGroupID != resv.dwResvGroupID)//非周期预约 { isCycle = false; timespan = Get1970Date((int)resv.dwBeginTime) + "至" + Get1970Date((int)resv.dwEndTime).Substring(11); } string occurtime = Get1970Date((int)resv.dwOccurTime); //申请模版 string applyTbl = "apply"; //申请模版 if ((resv.dwSecurityLevel & 0x20000000) > 0)//会议模版 { applyTbl = "apply_hy"; } string man = ""; string dict = ""; string service = ""; bool noCheck = true;//未审核 if (over) { man = "<span class='grey'>见【审核详情】</span>"; dict = "<span class='grey'>见【审核详情】</span>"; service = "<span class='grey'>见【审核详情】</span>"; } else { string msg; YARDRESVCHECKINFO[] ckInfo = GetResvCheckInfo(resv.dwResvID.ToString(), out msg); for (int j = 0; j < ckInfo.Length; j++) { YARDRESVCHECKINFO info = ckInfo[j]; if (noCheck && (info.dwCheckStat & (uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_ADMINOK) > 0) { noCheck = false; } CHECKTYPE mantype = IsInAarray(info.dwCheckKind, mantypes); CHECKTYPE dicttype = IsInAarray(info.dwCheckKind, dicttypes); CHECKTYPE servtype = IsInAarray(info.dwCheckKind, servtypes); if (mantype.dwCheckKind != null) { man = resv.szDeptName + "<br/>" + Util.Converter.GetCheckState(info.dwCheckStat); } else if (dicttype.dwCheckKind != null) { string name = dicttype.szDeptName; if (string.IsNullOrEmpty(name.Trim())) { name = acc.szDeptName; } //if (dicttype.dwDeptID != null || dicttype.dwDeptID != 0) name = acc.szDeptName; dict = name + "<br/>" + Util.Converter.GetCheckState(info.dwCheckStat); } else if (servtype.dwCheckKind != null) { service += info.szCheckName + "<br/>";//"(" + Util.Converter.GetCheckState(info.dwCheckStat) + ")<br/>" } } } resvList += "<tbody date='" + occurtime + "' over='" + (over?"true":"false") + "' style='display:none;'>" + "<tr class='head'><td colspan='6'><h3>" + resv.szResvName + "<small>" + ((resv.dwProperty & (uint)UNIRESERVE.DWPROPERTY.RESVPROP_UNOPEN) > 0 ? "(不公开)" : "(公开)") + "</small></h3>" + "<span>状态:<strong class='green'>" + Util.Converter.ResvStatusWithCheck(resv.dwStatus) + "</strong> </span><span class='pull-right'>" + "<span class='grey'>单号:" + groupId + " </span><a class='activity_detail' resv_id='" + groupId + "'>详情</a></span></td></tr>" + "<tr class='content'><td><div class='box'><span class='load_apply_detail'>" + resv.szDevName + "</span><br/><a target='_blank' href='applydetail.aspx?resv_id=" + groupId + "' >详细</a> | <a onclick='copyApply(\"" + groupId + "\",\"" + resv.dwActivitySN + "\",\"" + applyTbl + ".aspx\")'>复制申请</a></div></td>" + "<td>" + dict + "</td>" + "<td>" + man + "</td>" + "<td>" + timespan + "<button type='button' class='btn btn-info btn-xs time_detail " + (isCycle?"":"hidden") + "' resv_id='" + groupId + "' no_check='" + noCheck + "'><<时间明细 </button></td>" + "<td>服务:<br /><span class='part'>" + service + "</span></td>" + "<td class='text-center'><div style='margin: 5px auto;'>" + GetAct(resv, delList, noCheck) + "</div><div>" + "<button type='button' class='btn btn-info btn-xs check_state' resv_id='" + resv.dwResvID + "'> 审核详情 </button></div></td></tr></tbody>"; detailList += "<div id='detail_" + groupId + "'><table class='detail_info'>" + "<tr><td>活动场景</td><td>" + resv.szActivityName + "</td></tr>" + "<tr><td>组织方</td><td>" + resv.szOrganization + "</td></tr>" + "<tr><td>人数规模</td><td>" + resv.dwMaxAttendance + "人 </td></tr>" + "<tr><td>校区</td><td>" + resv.szCampusName + "</td></tr>" + "<tr><td>申请时间</td><td>" + occurtime + "</td></tr>" + "<tr><td>是否盈利</td><td>" + ((resv.dwProperty & (uint)UNIRESERVE.DWPROPERTY.RESVPROP_PROFIT) > 0?"营利":"非营利") + "</td></tr></table></div>"; } if (rlt.Length == 0) { resvList = "<tbody><tr><td colspan='6' class='text-center'>没有数据</td></tr></tbody>"; } } else { MsgBoxH(m_Request.szErrMsg); } //删除明细 // req.dwStatFlag = (uint)RESVREQ.DWSTATFLAG.STATFLAG_DEL; // req.dwBeginDate = ToUInt(DateTime.Now.AddMonths(-12).ToString("yyyyMMdd")); // if (m_Request.Reserve.GetYardResv(req, out rlt) == REQUESTCODE.EXECUTE_SUCCESS) // { // for (int i = 0; i < rlt.Length; i++) // { // YARDRESV resv = rlt[i]; // delList += "<tr class='it'><td>" + resv.dwResvID + "</td><td>" + resv.szResvName + "</td><td>" + resv.szDevName + "</td>" + //"<td>" + resv.szDeptName + "</td><td class='text-center'>" + Get1970Date((int)resv.dwBeginTime).Substring(5) + "至" + Get1970Date((int)resv.dwEndTime).Substring(5) + "</td>" + //"<td class='text-center'>" + Get1970Date((int)resv.dwOccurTime) + "</td></tr>"; // } // if (rlt.Length == 0) // { // resvList = "<tbody><tr><td colspan='6' class='text-center'>没有数据</td></tr></tbody>"; // } // } // else // { // MsgBoxH(m_Request.szErrMsg); // } }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; YARDRESVCHECKINFOREQ vrPar = new YARDRESVCHECKINFOREQ(); GetHTTPObj(out vrPar); string szYardKind = Request["yardKind"]; uint uYardKind = Parse(szYardKind); uint uBeginDate = GetDate(Request["dwStartDate"]); uint uEndDate = GetDate(Request["dwEndDate"]); 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(); uResponse = m_Request.Reserve.GetYardResvCheckInfo(vrPar, out vtRes); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtRes != null && vtRes.Length > 0) { System.IO.StringWriter swCSV = new System.IO.StringWriter(); swCSV.WriteLine("活动名称,申请人,申请资源,申请时间,申请部门,状态,审核时间,审核员"); uint uResvID = (uint)vtRes[0].YardResv.dwResvID; for (int i = 0; i < vtRes.Length; i++) { uint uResvDate = (uint)vtRes[i].YardResv.dwPreDate; if (uResvDate > uEndDate || uResvDate < uBeginDate) { continue; } if (uYardKind != 0 && uYardKind != (uint)vtRes[i].YardResv.dwKind) { continue; } bool bISExist = false; for (int k = 0; k < listResvID.Count; k++) { uint uResvIDTemp = (uint)listResvID[k]; if (uResvIDTemp == uResvID) { bISExist = true; continue; } } if (bISExist) { continue; } listResvID.Add(uResvID); System.Text.StringBuilder sbText = new System.Text.StringBuilder(); sbText = AppendCSVFields(sbText, vtRes[i].YardResv.szActivityName); sbText = AppendCSVFields(sbText, vtRes[i].YardResv.szApplicantName); sbText = AppendCSVFields(sbText, vtRes[i].YardResv.szDevName); YARDRESV[] vtResvGroup = GetYardResvByGroupID((uint)vtRes[0].YardResv.dwResvID); if (vtResvGroup != null && vtResvGroup.Length > 0) { if (vtResvGroup.Length > 1) { szResvTime += "【" + vtResvGroup.Length + "】条:" + "<br/>"; } for (int m = 0; m < vtResvGroup.Length; m++) { if (m < 5) { if (((m + 1) % 2) == 0) { szResvTime += Get1970Date(vtResvGroup[m].dwBeginTime) + "至" + Get1970Date(vtResvGroup[m].dwEndTime) + "<br/>"; } else { szResvTime += Get1970Date(vtResvGroup[m].dwBeginTime) + "至" + Get1970Date(vtResvGroup[m].dwEndTime) + ";"; } } // else { szResvTimeAll += Get1970Date(vtResvGroup[m].dwBeginTime) + "至" + Get1970Date(vtResvGroup[m].dwEndTime) + ";"; } } } sbText = AppendCSVFields(sbText, szResvTimeAll); string szCheckName = ""; CHECKTYPE checkType = new CHECKTYPE(); if (GetCheckType((uint)vtRes[i].dwCheckKind, out checkType)) { szCheckName = GetJustNameEqual((uint)checkType.dwMainKind, "CheckType_Kind"); } sbText = AppendCSVFields(sbText, (vtRes[i].szCheckName) + ":" + szCheckName); sbText = AppendCSVFields(sbText, GetJustNameEqual(vtRes[i].dwCheckStat, "Admin_CheckStatus")); sbText = AppendCSVFields(sbText, Get1970Date(vtRes[i].dwCheckTime)); sbText = AppendCSVFields(sbText, vtRes[i].szAdminName); //去掉尾部的逗号 sbText.Remove(sbText.Length - 1, 1); //写datatable的一行 swCSV.WriteLine(sbText.ToString()); } DownloadFile(Response, swCSV.GetStringBuilder(), "RuleDaySum.csv"); swCSV.Close(); Response.End(); } } }
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(); }
private void InitYardResv(string id) { if (string.IsNullOrEmpty(id)) { return; } YARDRESVREQ req = new YARDRESVREQ(); req.dwResvGroupID = ToUInt(id); //req.dwReqProp = (uint)YARDRESVREQ.DWREQPROP.YARDREQ_ONLYMAINRESV;必须获取多条才能判断是否批量预约 req.dwStatFlag = (uint)RESVREQ.DWSTATFLAG.STATFLAG_OVER | (uint)RESVREQ.DWSTATFLAG.STATFLAG_INUSE | (uint)RESVREQ.DWSTATFLAG.STATFLAG_DEL | (uint)RESVREQ.DWSTATFLAG.STATFLAG_CHECKFAIL; YARDRESV[] rlt; if (m_Request.Reserve.GetYardResv(req, out rlt) == REQUESTCODE.EXECUTE_SUCCESS) { if (rlt.Length > 0) { resv = rlt[0]; ///////////////// CHECKTYPE[] mantypes = GetCheckType(null, (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_DEVMAN); CHECKTYPE[] dicttypes = GetCheckType(null, (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_DIRECTOR); CHECKTYPE[] servtypes = GetCheckType(null, (uint)CHECKTYPE.DWMAINKIND.ADMINCHECK_SERVICE); string msg; YARDRESVCHECKINFO[] ckInfo = GetResvCheckInfo(id, out msg); string man = ""; string dict = ""; string service = ""; for (int j = 0; j < ckInfo.Length; j++) { YARDRESVCHECKINFO info = ckInfo[j]; CHECKTYPE mantype = IsInAarray(info.dwCheckKind, mantypes); CHECKTYPE dicttype = IsInAarray(info.dwCheckKind, dicttypes); CHECKTYPE servtype = IsInAarray(info.dwCheckKind, servtypes); if (mantype.dwCheckKind != null) { man = resv.szDeptName + " (" + GetCheckState(info.dwCheckStat) + ")"; } else if (dicttype.dwCheckKind != null) { UNIACCOUNT acc = (UNIACCOUNT)Session["LOGIN_ACCINFO"]; string name = dicttype.szDeptName; if (string.IsNullOrEmpty(name.Trim())) { name = acc.szDeptName; } dict = name + " (" + GetCheckState(info.dwCheckStat) + ")"; } else if (servtype.dwCheckKind != null) { service += info.szCheckName + " "; } } checkService = service; checkDirector = dict; checkMan = man; //////////////////////// status = ToUInt(resv.dwStatus); profit = (resv.dwProperty & (uint)UNIRESERVE.DWPROPERTY.RESVPROP_PROFIT) > 0?"是":"否"; media = (resv.dwProperty & 0x4000000) > 0 ? "是" : "否"; open = (resv.dwProperty & (uint)UNIRESERVE.DWPROPERTY.RESVPROP_UNOPEN) > 0 ? "否" : "是"; require = resv.szDesiredUser; if (rlt.Length > 1) { resvTime = resv.szCycRule; } else { resvTime = Get1970Date((int)resv.dwBeginTime) + "至" + Get1970Date((int)resv.dwEndTime).Substring(11); } isShare = (resv.dwProperty & (uint)UNIDEVKIND.DWPROPERTY.DEVPROP_SHARE) > 0;//室外场地 atyType = GetTypeList(resv.dwKind.ToString()); //申请模版 applyTbl = "dft"; //申请模版 if ((resv.dwSecurityLevel & 0x20000000) > 0)//会议模版 { applyTbl = "hy"; } else if ((resv.dwSecurityLevel & 0x800000) > 0)//体育场地 { isSports = true; } } } else { MsgBoxH(m_Request.szErrMsg); } }