protected void Page_Load(object sender, EventArgs e) { FeeSN.Value = Request["dwID"]; if (Request["FeeType"] != null) { Del(Request["FeeSN"]); } else if (Request["op"] == "set") { bSet = true; FEEREQ vrFeeGet = new FEEREQ(); vrFeeGet.dwFeeSN = Parse(Request["dwID"]); UNIFEE[] vtFee; if (m_Request.Fee.Get(vrFeeGet, out vtFee) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { if (vtFee.Length == 0) { MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { PutJSObj(vtFee[0]); m_Title = "设置收费明细"; PutFeeDetailToHtml(vtFee[0]); } } } }
private void getFee() { FEEREQ req = new FEEREQ(); string dept = Request["dept"]; string kind = Request["dev_kind"]; string ident = Request["ident"]; string sn = Request["fee_sn"]; if (!string.IsNullOrEmpty(dept) && dept != "0") { req.dwDeptID = ToUInt(dept); } if (!string.IsNullOrEmpty(kind) && kind != "0") { req.dwDevKind = ToUInt(kind); } if (!string.IsNullOrEmpty(ident) && ident != "0") { req.dwIdent = ToUInt(ident); } if (!string.IsNullOrEmpty(sn) && sn != "0") { req.dwIdent = ToUInt(sn); } UNIFEE[] rlt; if (m_Request.Fee.Get(req, out rlt) == REQUESTCODE.EXECUTE_SUCCESS) { SucRlt(rlt); } else { ErrMsg(); } }
bool GetIdentFee(UNIDEVICE dev, uint?ident) { FEEREQ vrGet = new FEEREQ(); vrGet.dwDevKind = dev.dwKindID; vrGet.dwIdent = ident; UNIFEE[] rlt; if (m_Request.Fee.Get(vrGet, out rlt) == REQUESTCODE.EXECUTE_SUCCESS && rlt != null && rlt.Length > 0) { for (int i = 0; i < rlt.Length; i++) { FEEDETAIL[] fees = rlt[i].szFeeDetail; for (int j = 0; j < fees.Length; j++) { FEEDETAIL fee = fees[j]; if (fee.dwUnitFee == null || fee.dwUnitTime == null || fee.dwUnitTime == 0) { fee.dwUnitFee = 0; fee.dwUnitTime = 1; } if (fees[j].dwFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_USEDEV) { useFee += "<td class='s-f'><span>" + ((float)(fee.dwUnitFee / 100.00 * 60 / fee.dwUnitTime)).ToString("F2") + "</span> 元/小时</td>"; } else if (fees[j].dwFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_ENTRUST) { subFee += "<td class='s-f'><span>" + ((float)(fee.dwUnitFee / 100.00 * 60 / fee.dwUnitTime)).ToString("F2") + "</span> 元/小时</td>"; } } } return(true); } return(false); }
public RTBILL[] GetUniFeeVTFromHtml(string szFeeSN, out uint uTotal) { REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; uTotal = 0; FEEREQ vrGet = new FEEREQ(); vrGet.dwFeeSN = (uint.Parse(szFeeSN)); UNIFEE[] vtRes; uResponse = m_Request.Fee.Get(vrGet, out vtRes); ArrayList list = new ArrayList(); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtRes != null && vtRes.Length > 0) { UNIFEE setFee = new UNIFEE(); setFee = vtRes[0]; FEEDETAIL[] vtFeeDetail = setFee.szFeeDetail; for (int i = 0; i < vtFeeDetail.Length; i++) { uint uFeeType = (uint)vtFeeDetail[i].dwFeeType; RTBILL vtBillTemp = new RTBILL(); vtBillTemp.dwFeeType = (uFeeType); vtBillTemp.dwResvID = Parse(szidh.Value); uint uReal = 0; double fReal = 0; uint dwUnitFee = (uint)vtFeeDetail[i].dwUnitFee; if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_USEDEV)) { double.TryParse(hiddenUseDevTotal.Value, out fReal); } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_SAMPLE)) { double.TryParse(hiddenSampleTotal.Value, out fReal); } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_ENTRUST) && ViewState["dwProperty"] != null && ViewState["dwProperty"].ToString() == "true") { double.TryParse(hiddenENTRUSTTotal.Value, out fReal); } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_SAMPLE) && ViewState["dwProperty2"] != null && ViewState["dwProperty2"].ToString() == "false")//不是自带才收费 { double.TryParse(txtCONSUMABLETotal.Value, out fReal); } uReal = (uint)(fReal * 100); vtBillTemp.dwReceivableCost = uReal; vtBillTemp.dwUnitFee = dwUnitFee; uTotal = uTotal + uReal; list.Add(vtBillTemp); } } RTBILL[] vtBill = new RTBILL[list.Count];; for (int i = 0; i < list.Count; i++) { vtBill[i] = (RTBILL)list[i]; } return(vtBill); }
private void Del(string szID) { REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; FEEREQ vrGet = new FEEREQ(); vrGet.dwFeeSN = Parse(szID); UNIFEE[] vtRes; UNIFEE setVale = new UNIFEE(); uResponse = m_Request.Fee.Get(vrGet, out vtRes); uint uFeeType = Parse(Request["FeeType"]); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtRes != null && vtRes.Length > 0) { setVale = vtRes[0]; int uLen = 0; uLen = vtRes[0].szFeeDetail.Length; if (uLen > 1) { uLen = uLen - 1; FEEDETAIL[] feeDetailList = new FEEDETAIL[uLen]; int uCount = 0; for (int i = 0; i < vtRes[0].szFeeDetail.Length; i++) { if (!((uint)vtRes[0].szFeeDetail[i].dwFeeType == uFeeType)) { feeDetailList[uCount] = new FEEDETAIL(); feeDetailList[uCount] = vtRes[0].szFeeDetail[i]; uCount++; } } setVale.szFeeDetail = feeDetailList; } else { setVale.szFeeDetail = null; } uResponse = m_Request.Fee.Set(setVale, out setVale); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS) { MessageBox("删除成功", "删除成功", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); } else { MessageBox(m_Request.szErrMessage, "删除失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); } } }
protected void Page_Load(object sender, EventArgs e) { Response.CacheControl = "no-cache"; MyString szOut = new MyString(); string feeSN = Request["feeSN"]; REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; FEEREQ vrGet = new FEEREQ(); vrGet.dwFeeSN = Parse(feeSN); UNIFEE[] vtRes; uResponse = m_Request.Fee.Get(vrGet, out vtRes); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtRes != null && vtRes.Length > 0) { string szRes = "{\"message\":\"succ\""; int uLen = vtRes[0].szFeeDetail.Length; UNIFEE setValue = vtRes[0]; for (int i = 0; i < uLen; i++) { uint uFeetType = (uint)setValue.szFeeDetail[i].dwFeeType; uint uFeeUint = (uint)setValue.szFeeDetail[i].dwUnitFee; uint uFeeTime = (uint)setValue.szFeeDetail[i].dwUnitTime; if (uFeetType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_USEDEV) { szRes += ", \"useFeeUint\":\"" + uFeeUint.ToString() + "\"" + ", \"useTimeUint\":\"" + uFeeTime.ToString() + "\""; } else if (uFeetType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_SAMPLE) { szRes += ", \"conFeeUint\":\"" + uFeeUint.ToString() + "\"" + ", \"conTimeUint\":\"" + uFeeTime.ToString() + "\""; } else if (uFeetType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_ENTRUST) { szRes += ", \"entFeeUint\":\"" + uFeeUint.ToString() + "\"" + ", \"entTimeUint\":\"" + uFeeTime.ToString() + "\""; } else if (uFeetType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_SAMPLE) { szRes += ", \"sampleFeeUint\":\"" + uFeeUint.ToString() + "\"" + ", \"sampleTimeUint\":\"" + uFeeTime.ToString() + "\""; } } szRes = szRes + "}"; Response.Write(szRes); } else { Response.Write("{\"message\":\"" + m_Request.szErrMessage + "\"}"); } }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { } UNIDEVKIND[] vtDevKind = GetAllDevKind(); for (int i = 0; i < vtDevKind.Length; i++) { m_szDevKind += GetInputItemHtml(CONSTHTML.checkBox, "dwKindID", vtDevKind[i].szKindName, vtDevKind[i].dwKindID.ToString()); } if (IsPostBack) { FEEREQ vrGet = new FEEREQ(); vrGet.dwFeeSN = Parse(Request["dwID"]); uint uSN = Parse(Request["sn"]); UNIFEE[] vtRes; REQUESTCODE uResponse = m_Request.Fee.Get(vrGet, out vtRes); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtRes != null && vtRes.Length > 0) { string szDevKind = Request["dwKindID"]; string[] szDevKindList = szDevKind.Split(','); for (int i = 0; i < szDevKindList.Length; i++) { if (szDevKindList[i] == null || szDevKindList[i] == "") { continue; } UNIFEE setFee = vtRes[0]; UNIDEVKIND devKind; if (GetDevKindByID(szDevKindList[i], out devKind)) { setFee.szFeeName = devKind.szKindName.ToString() + "计费规则" + GetJustNameEqual(vtRes[0].dwIdent, "Fee_Ident"); } setFee.dwFeeSN = (uSN + 1); setFee.dwDevKind = Parse(szDevKindList[i]); m_Request.Fee.Set(setFee, out setFee); uSN = uSN + 1; } } MessageBox("复制完毕", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); return; } }
protected void Page_Load(object sender, EventArgs e) { if (Request["delID"] != null) { DelFee(Request["delID"]); } FEEREQ vrParameter = new FEEREQ(); UNIFEE[] vrResult; GetPageCtrlValue(out vrParameter.szReqExtInfo); if (m_Request.Fee.Get(vrParameter, out vrResult) == REQUESTCODE.EXECUTE_SUCCESS) { for (int i = 0; i < vrResult.Length; i++) { m_szOut += "<tr>"; m_szOut += "<td data-id=\"" + vrResult[i].dwFeeSN.ToString() + "\">" + vrResult[i].dwFeeSN + "</td>"; m_szOut += "<td>" + vrResult[i].szFeeName + "</td>"; string szIdent = (uint)vrResult[i].dwIdent == 0 ? "全部" :GetJustNameEqual((uint)vrResult[i].dwIdent, "Fee_Ident"); m_szOut += "<td>" + szIdent + "</td>"; m_szOut += "<td>" + vrResult[i].dwPriority.ToString() + "</td>"; if (vrResult[i].dwPurpose == 0) { m_szOut += "<td>" + "全部" + "</td>"; } else { m_szOut += "<td>" + GetJustName(vrResult[i].dwPurpose, "ResvPurpose") + "</td>"; } m_szOut += "<td><div class='OPTD'></div></td>"; m_szOut += "</tr>"; } UpdatePageCtrl(m_Request.Fee); } PutBackValue(); }
protected void Page_Load(object sender, EventArgs e) { Response.CacheControl = "no-cache"; MyString szOut = new MyString(); string feeSN = Request["feeSN"]; string szIdent = Request["ident"]; string useFeeUint = Request["useFeeUint"]; string useTimeUint = Request["useTimeUint"]; string conFeeUint = Request["conFeeUint"]; string conTimeUint = Request["conTimeUint"]; string entFeeUint = Request["entFeeUint"]; string entTimeUint = Request["entTimeUint"]; string sampleFeeUint = Request["sampleFeeUint"]; string sampleTimeUint = Request["sampleTimeUint"]; REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; FEEREQ vrGet = new FEEREQ(); vrGet.dwFeeSN = Parse(feeSN); // vrGet.dwIdent = Parse(szIdent); UNIFEE[] vtRes; uResponse = m_Request.Fee.Get(vrGet, out vtRes); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtRes != null && vtRes.Length > 0) { int uLen = vtRes[0].szFeeDetail.Length; UNIFEE setValue = vtRes[0]; for (int i = 0; i < uLen; i++) { uint uFeetType = (uint)setValue.szFeeDetail[i].dwFeeType; if (uFeetType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_USEDEV) { setValue.szFeeDetail[i].dwUnitFee = Parse(useFeeUint); setValue.szFeeDetail[i].dwUnitTime = Parse(useTimeUint); } //else if (uFeetType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_CONSUMABLE) 20141017 //{ // setValue.szFeeDetail[i].dwUnitFee = Parse(conFeeUint); // setValue.szFeeDetail[i].dwUnitTime = Parse(conTimeUint); //} else if (uFeetType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_ENTRUST) { setValue.szFeeDetail[i].dwUnitFee = Parse(entFeeUint); setValue.szFeeDetail[i].dwUnitTime = Parse(entTimeUint); } else if (uFeetType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_SAMPLE) { setValue.szFeeDetail[i].dwUnitFee = Parse(sampleFeeUint); setValue.szFeeDetail[i].dwUnitTime = Parse(sampleTimeUint); } } uResponse = m_Request.Fee.Set(setValue, out setValue); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS) { Response.Write("{\"message\":\"succ\"}"); } else { Response.Write("{\"message\":\"" + m_Request.szErrMessage + "\"}"); } } }
public void GetUniFee(string szFeeSN, uint uMin, bool bCheck, bool bIsSzum, bool bPei, uint uSumbule, uint uSampleMoney) { REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; string szfeeType = ""; FEEREQ vrGet = new FEEREQ(); vrGet.dwFeeSN = Parse(szFeeSN); UNIFEE[] vtRes; uResponse = m_Request.Fee.Get(vrGet, out vtRes); double uFeeTotal = 0; uFeeTotal = uFeeTotal + uSampleMoney / 100 + uSampleMoney % 100; if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtRes != null && vtRes.Length > 0) { UNIFEE setFee = new UNIFEE(); setFee = vtRes[0]; FEEDETAIL[] vtFeeDetail = setFee.szFeeDetail; string uTotal = GetTimeForSecond(uMin); for (int i = 0; i < vtFeeDetail.Length; i++) { uint uFeeType = (uint)vtFeeDetail[i].dwFeeType; uint uFeeUint = (uint)vtFeeDetail[i].dwUnitFee; uint uFeeTime = (uint)vtFeeDetail[i].dwUnitTime; if (uFeeTime == 0) { uFeeTime = 1; } double fUint60 = double.Parse(((uFeeUint * 60 * 1.0) / (100 * uFeeTime)).ToString("F2")); double fTotalTemp = fUint60 * uMin / (60 * 60); string szFeeTemp = ChinaRound(fTotalTemp, 2).ToString(); string szFeeUint = ((uFeeUint * 1.0) / 100 * 60 / uFeeTime).ToString("0.00");; if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_USEDEV)) { lblUseDevTotal.InnerText = szFeeTemp; hiddenUseDevTotal.Value = szFeeTemp; lblUseDevFee.Text = uTotal; lblUseDev.Text = szFeeUint; divUseDev.Style.Clear(); szfeeType += ((uint)FEEDETAIL.DWFEETYPE.FEETYPE_USEDEV).ToString() + ","; uFeeTotal += ChinaRound(fTotalTemp, 2); } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_OCCUPY)) { lblOccupyTotal.InnerText = szFeeTemp; lblOccupyFee.Text = uTotal; lblOccupy.Text = szFeeUint; divOccupy.Style.Clear(); szfeeType += ((uint)FEEDETAIL.DWFEETYPE.FEETYPE_OCCUPY).ToString() + ","; } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_ASSIST) && bPei) { lblASSISTotal.InnerText = szFeeTemp; lblASSISFee.Text = uTotal; lblASSIS.Text = szFeeUint; divASSIST.Style.Clear(); szfeeType += ((uint)FEEDETAIL.DWFEETYPE.FEETYPE_ASSIST).ToString() + ","; } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_TIMEOUT)) { lblASSISTotal.InnerText = szFeeTemp; lblTIMEOUTFee.Text = uTotal; lblTIMEOUT.Text = szFeeUint; divTIMEOUT.Style.Clear(); szfeeType += ((uint)FEEDETAIL.DWFEETYPE.FEETYPE_TIMEOUT).ToString() + ","; } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_SAMPLE) && !bIsSzum) { lblCONSUMABLETotal.InnerText = ((uFeeUint * 1.0) / 100 * uSumbule).ToString("0.0"); lblCONSUMABLEFee.Text = uSumbule.ToString(); lblCONSUMABLE.Text = szFeeUint; divCONSUMABLE.Style.Clear(); szfeeType += ((uint)FEEDETAIL.DWFEETYPE.FEETYPE_SAMPLE).ToString() + ","; } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_SAMPLE)) { hiddenSampleTotal.Value = uSampleMoney / 100 + "." + uSampleMoney % 100; /* * fTotalTemp = (double)(((uFeeUint * 1.0) / 100) * uSumbule); * lblSampleTotal.InnerText = fTotalTemp.ToString("0.0"); * hiddenSampleTotal.Value = fTotalTemp.ToString("0.0"); * lblSampleFee.Text = uSumbule.ToString(); * lblSample.Text = ((uFeeUint * 1.0) / 100).ToString("0.0"); * * szfeeType += ((uint)FEEDETAIL.DWFEETYPE.FEETYPE_SAMPLE).ToString() + ","; * uFeeTotal += ChinaRound(fTotalTemp, 2); * */ divSample.Style.Clear(); } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_RESVDEV)) { lblRESVDEVTotal.InnerText = szFeeTemp; lblRESVDEVFee.Text = uTotal; lblRESVDEV.Text = szFeeUint; divRESVDEV.Style.Clear(); szfeeType += ((uint)FEEDETAIL.DWFEETYPE.FEETYPE_RESVDEV).ToString() + ","; } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_ENTRUST) && bCheck) { lblENTRUSTTotal.InnerText = szFeeTemp; hiddenENTRUSTTotal.Value = szFeeTemp; lblENTRUSTFee.Text = uTotal; lblENTRUST.Text = szFeeUint; divENTRUST.Style.Clear(); szfeeType += ((uint)FEEDETAIL.DWFEETYPE.FEETYPE_ENTRUST).ToString() + ","; uFeeTotal += ChinaRound(fTotalTemp, 2); } } } feeType.Value = szfeeType; lblSum.InnerText = uFeeTotal.ToString("0.00");; }
protected void Page_Load(object sender, EventArgs e) { if (IsPostBack) { uint uFee = Parse(Request["dwUniFee"]); uint uUintTime = Parse(Request["dwUniTime"]); UNIFEE FeeValue = new UNIFEE(); FEEREQ vrFeeGet = new FEEREQ(); vrFeeGet.dwFeeSN = Parse(Request["dwFeeSN"]); UNIFEE[] feeList; if (m_Request.Fee.Get(vrFeeGet, out feeList) == REQUESTCODE.EXECUTE_SUCCESS && feeList != null && feeList.Length > 0) { FeeValue = feeList[0]; FEEDETAIL detail = new FEEDETAIL(); detail.dwFeeType = (uint)FEEDETAIL.DWFEETYPE.FEETYPE_USEDEV; detail.dwUnitFee = uFee * 100; detail.dwUnitTime = uUintTime; FeeValue.szFeeDetail = new FEEDETAIL[1]; FeeValue.szFeeDetail[0] = new FEEDETAIL(); FeeValue.szFeeDetail[0] = detail; } else { //新建收费标准 uint?uMax = 0; uint uID = PRFee.FEE_BASE | PRFee.MSREQ_FEE_SET; if (GetMaxValue(ref uMax, uID, "dwFEESN")) { } FeeValue.dwFeeSN = uMax; UNIDEVICE setValue; if (!getDevByID(Request["dwID"].ToString(), out setValue)) { MessageBox("资源信息获取失败", "资源信息获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); return; } FeeValue.dwDevKind = setValue.dwKindID; FeeValue.dwPriority = 2; FeeValue.dwPurpose = 55; FeeValue.szFeeName = setValue.szDevName.ToString() + "收费标准"; FEEDETAIL detail = new FEEDETAIL(); detail.dwFeeType = (uint)FEEDETAIL.DWFEETYPE.FEETYPE_USEDEV; detail.dwUnitFee = uFee * 100; detail.dwUnitTime = uUintTime; FeeValue.szFeeDetail = new FEEDETAIL[1]; FeeValue.szFeeDetail[0] = new FEEDETAIL(); FeeValue.szFeeDetail[0] = detail; } if (m_Request.Fee.Set(FeeValue, out FeeValue) == REQUESTCODE.EXECUTE_SUCCESS) { Logger.trace(m_Request.szErrMessage); MessageBox("设置成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); } } if (Request["op"] == "set") { UNIDEVICE setValue; if (!getDevByID(Request["dwID"].ToString(), out setValue)) { MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); return; } bSet = true; FEEREQ vrFeeGet = new FEEREQ(); vrFeeGet.dwDevKind = setValue.dwKindID; UNIFEE[] vtFee; if (m_Request.Fee.Get(vrFeeGet, out vtFee) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { if (vtFee.Length == 0) { //MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { PutMemberValue("dwFeeSN", vtFee[0].dwFeeSN.ToString()); PutMemberValue("dwUniFee", (vtFee[0].szFeeDetail[0].dwUnitFee / 100).ToString()); PutMemberValue("dwUniTime", (vtFee[0].szFeeDetail[0].dwUnitTime).ToString()); m_Title = "修改收费标准"; } } } else { } }
protected void Page_Load(object sender, EventArgs e) { UNIFEE newFee; uint? uMax = 0; uint uID = PRDevice.DEVICE_BASE | PRDevice.MSREQ_LAB_SET; if (GetMaxValue(ref uMax, uID, "dwLabID")) { } if (IsPostBack) { GetHTTPObj(out newFee); newFee.dwPurpose = CharListToUint(Request["dwPurpose"]); if (m_Request.Fee.Set(newFee, out newFee) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "修改收费标准失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); } else { MessageBox("修改收费标准成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); return; } } m_dwQuotaRule = GetAllInputHtml(CONSTHTML.option, "", "Fee_QuotaRule"); m_szIdent = GetAllInputHtml(CONSTHTML.option, "", "Fee_Ident"); UNIDEVKIND[] vtDevKind = GetAllDevKind(); m_szDevKind += "<option value='" + "0" + "'>" + "全部适用" + "</option>"; if (vtDevKind != null && vtDevKind.Length > 0) { for (int i = 0; i < vtDevKind.Length; i++) { m_szDevKind += "<option value='" + vtDevKind[i].dwKindID + "'>" + vtDevKind[i].szKindName + "</option>"; } } m_szResvPurpose = GetAllInputHtml(CONSTHTML.checkBox, "dwPurpose", "ResvPurpose"); m_dwPriority = GetAllInputHtml(CONSTHTML.option, "", "Priority"); if (Request["op"] == "set") { bSet = true; FEEREQ vrFeeGet = new FEEREQ(); vrFeeGet.dwFeeSN = Parse(Request["dwID"]); UNIFEE[] vtFee; if (m_Request.Fee.Get(vrFeeGet, out vtFee) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { if (vtFee.Length == 0) { MessageBox("获取失败", "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { PutJSObj(vtFee[0]); m_Title = "修改收费标准"; } } } else { } }
protected void Page_Load(object sender, EventArgs e) { if (Session["LoginResult"] != null) { ADMINLOGINRES adminAcc = (ADMINLOGINRES)Session["LoginResult"]; uint uManRole = (uint)adminAcc.dwManRole; if ((uManRole & (uint)ADMINLOGINRES.DWMANROLE.MANSCOPE_LABCTR) > 0) { nIsAdminSup = 0; } else if ((uManRole & (uint)ADMINLOGINRES.DWMANROLE.MANSCOPE_LAB) > 0) { nIsAdminSup = 0; } else if ((uManRole & (uint)ADMINLOGINRES.DWMANROLE.MANSCOPE_ROOM) > 0) { nIsAdminSup = 0; } } UNIFEE newFee; uint? uMax = 0; uint uID = PRDevice.DEVICE_BASE | PRDevice.MSREQ_LAB_SET; if (GetMaxValue(ref uMax, uID, "dwLabID")) { } if (IsPostBack) { GetHTTPObj(out newFee); if (m_Request.Fee.Set(newFee, out newFee) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "修改收费标准失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); } else { MessageBox("修改收费标准成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); return; } } if (Request["op"] == "set") { bSet = true; FEEREQ vrFeeGet = new FEEREQ(); string szKindID = Request["kindid"]; string szID = Request["dwID"]; if (szKindID != null && szKindID != "") { vrFeeGet.dwDevKind = Parse(szKindID); } else if (szID != null && szID != "") { vrFeeGet.dwFeeSN = Parse(szID); } UNIFEE[] vtFee; if (m_Request.Fee.Get(vrFeeGet, out vtFee) != REQUESTCODE.EXECUTE_SUCCESS) { MessageBox(m_Request.szErrMessage, "获取失败", MSGBOX.ERROR, MSGBOX_ACTION.CANCEL); } else { for (int i = 0; i < vtFee.Length; i++) { if (vtFee[i].dwIdent != null && vtFee[i].dwIdent != (uint)UNIACCOUNT.DWIDENT.EXTIDENT_INNER) { string szCheck = ""; if (i == 0) { szCheck = " checked=\"true\""; int uFeeDetailLen = 0; ViewState["feeSN"] = vtFee[i].dwFeeSN.ToString(); ViewState["ident"] = vtFee[i].dwIdent.ToString(); if (vtFee[i].szFeeDetail != null) { uFeeDetailLen = vtFee[i].szFeeDetail.Length; for (int k = 0; k < uFeeDetailLen; k++) { uint uFeetType = (uint)vtFee[i].szFeeDetail[k].dwFeeType; uint?uFeeUint = vtFee[i].szFeeDetail[k].dwUnitFee; uint?uFeeTime = vtFee[i].szFeeDetail[k].dwUnitTime; if (uFeetType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_USEDEV) { ViewState["useFeeUint"] = uFeeUint.ToString(); ViewState["useTimeUint"] = uFeeTime.ToString(); } else if (uFeetType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_SAMPLE) { ViewState["conFeeUint"] = uFeeUint.ToString(); ViewState["conTimeUint"] = uFeeTime.ToString(); } else if (uFeetType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_ENTRUST) { ViewState["entFeeUint"] = uFeeUint.ToString(); ViewState["entTimeUint"] = uFeeTime.ToString(); } else if (uFeetType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_SAMPLE) { ViewState["sampleFeeUint"] = uFeeUint.ToString(); ViewState["sampleTimeUint"] = uFeeTime.ToString(); } } } } m_szFee += "<input class=\"enum\"" + szCheck + " type=\"radio\" name=\"" + "feeSN" + "\" id='" + vtFee[i].dwFeeSN.ToString() + "' /> <label for=\"" + vtFee[i].dwFeeSN.ToString() + "\">" + GetJustNameEqual(vtFee[i].dwIdent, "Fee_Ident") + "</label>"; } } } } }
protected void Page_Load(object sender, EventArgs e) { string szOP = Request["op"]; REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; FEEREQ vrGet = new FEEREQ(); vrGet.dwFeeSN = Parse(Request["FeeSN"]); UNIFEE[] vtRes; UNIFEE setValue = new UNIFEE(); uResponse = m_Request.Fee.Get(vrGet, out vtRes); int nFlag = -1; if (listPayKind == null) { listPayKind = GetListFromXml("UNIBILL_PayKind", 0, true); } for (int i = 0; i < listPayKind.Count; i++) { CStatue obj = (CStatue)listPayKind[i]; string szTemp = "<label><input class=\"enum\" type=\"checkbox\" name=\"dwUsablePayKind\" value=\"" + obj.szValue + "\" /> " + obj.szName + "</label>"; szUsablePayKind += szTemp; } m_checkInfo = GetInputHtmlFromXml(0, CONSTHTML.option, "", "FEEDETAIL_CHECKED", true); m_FeeType = GetInputHtmlFromXml(0, CONSTHTML.option, "", "FEEDETAIL_FeeType", true); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtRes != null && vtRes.Length > 0) { setValue = vtRes[0]; FEEDETAIL[] feeDetail = setValue.szFeeDetail; if (feeDetail != null && feeDetail.Length > 0) { for (int i = 0; i < feeDetail.Length; i++) { if ((uint)feeDetail[i].dwFeeType == Parse(Request["FeeType"])) { ConFeeDetail(feeDetail[i]); nFlag = i; break; } } } } if (IsPostBack) { if (Request["op"] == "set") { } else { FEEDETAIL feeDetalHtml; GetHTTPObj(out feeDetalHtml); feeDetalHtml.dwUsablePayKind = CharListToUint(Request["dwUsablePayKind"]); if (feeDetalHtml.dwFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_TIMEOUT)//超时费特殊处理 { if (feeDetalHtml.dwDefaultCheckStat.ToString() == "0") { feeDetalHtml.dwDefaultCheckStat = ((uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_OK); } else { feeDetalHtml.dwDefaultCheckStat = (0); } } ArrayList listFeeDetal = new ArrayList(); if (setValue.szFeeDetail == null || setValue.szFeeDetail.Length == 0)//原来就为空 { setValue.szFeeDetail = new FEEDETAIL[1]; setValue.szFeeDetail[0] = new FEEDETAIL(); setValue.szFeeDetail[0] = feeDetalHtml; } else { for (int i = 0; i < setValue.szFeeDetail.Length; i++) { listFeeDetal.Add(setValue.szFeeDetail[i]); } listFeeDetal.Add(feeDetalHtml); setValue.szFeeDetail = new FEEDETAIL[listFeeDetal.Count]; for (int i = 0; i < listFeeDetal.Count; i++) { setValue.szFeeDetail[i] = (FEEDETAIL)listFeeDetal[i]; } } uResponse = m_Request.Fee.Set(setValue, out setValue); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS) { MessageBox("新建成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); return; } else { MessageBox(m_Request.szErrMessage.ToString(), "提示", MSGBOX.ERROR, MSGBOX_ACTION.NONE); return; } } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["LoginResult"] != null) { ADMINLOGINRES adminAcc = (ADMINLOGINRES)Session["LoginResult"]; uint uManRole = (uint)adminAcc.dwManRole; if ((uManRole & (uint)ADMINLOGINRES.DWMANROLE.MANSCOPE_LABCTR) > 0) { nIsAdminSup = 0; } else if ((uManRole & (uint)ADMINLOGINRES.DWMANROLE.MANSCOPE_LAB) > 0) { nIsAdminSup = 0; } else if ((uManRole & (uint)ADMINLOGINRES.DWMANROLE.MANSCOPE_ROOM) > 0) { nIsAdminSup = 0; } } string szOP = Request["op"]; REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; FEEREQ vrGet = new FEEREQ(); vrGet.dwFeeSN = Parse(Request["FeeSN"]); UNIFEE[] vtRes; UNIFEE setValue = new UNIFEE(); uResponse = m_Request.Fee.Get(vrGet, out vtRes); int nFlag = -1; if (listPayKind == null) { listPayKind = GetListFromXml("UNIBILL_PayKind", 0, true); } for (int i = 0; i < listPayKind.Count; i++) { CStatue obj = (CStatue)listPayKind[i]; string szTemp = "<label><input class=\"enum\" type=\"checkbox\" name=\"dwUsablePayKind\" value=\"" + obj.szValue + "\" /> " + obj.szName + "</label>"; szUsablePayKind += szTemp; } m_checkInfo = GetInputHtmlFromXml(0, CONSTHTML.option, "", "FEEDETAIL_CHECKED", true); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS && vtRes != null && vtRes.Length > 0) { setValue = vtRes[0]; FEEDETAIL[] feeDetail = setValue.szFeeDetail; if (feeDetail != null && feeDetail.Length > 0) { for (int i = 0; i < feeDetail.Length; i++) { if ((uint)feeDetail[i].dwFeeType == Parse(Request["FeeType"])) { ConFeeDetail(feeDetail[i]); nFlag = i; break; } } } } if (IsPostBack) { if (Request["op"] == "set") { if (setValue.dwFeeSN == null) { MessageBox("未找到对于收费类别", "修改失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); return; } FEEDETAIL feeDetalHtml; GetHTTPObj(out feeDetalHtml); feeDetalHtml.dwUsablePayKind = CharListToUint(Request["dwUsablePayKind"]); if (feeDetalHtml.dwFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_TIMEOUT)//超时费特殊处理 { if (feeDetalHtml.dwDefaultCheckStat.ToString() == "0") { feeDetalHtml.dwDefaultCheckStat = ((uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_OK); } else { feeDetalHtml.dwDefaultCheckStat = (0); } } if (nFlag > -1) { feeDetalHtml.dwFeeType = setValue.szFeeDetail[nFlag].dwFeeType; setValue.szFeeDetail[nFlag] = feeDetalHtml; } uResponse = m_Request.Fee.Set(setValue, out setValue); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS) { MessageBox("修改成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); return; } else { MessageBox(m_Request.szErrMessage.ToString(), "提示", MSGBOX.ERROR, MSGBOX_ACTION.NONE); return; } } else { if (setValue.dwFeeSN == null) { MessageBox("未找到对于收费类别", "修改失败", MSGBOX.ERROR, MSGBOX_ACTION.NONE); return; } FEEDETAIL feeDetalHtml; GetHTTPObj(out feeDetalHtml); if (feeDetalHtml.dwFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_TIMEOUT)//超时费特殊处理 { if (feeDetalHtml.dwDefaultCheckStat.ToString() == "0") { feeDetalHtml.dwDefaultCheckStat = ((uint)ADMINCHECK.DWCHECKSTAT.CHECKSTAT_OK); } else { feeDetalHtml.dwDefaultCheckStat = (0); } } int uLen = setValue.szFeeDetail.Length; setValue.szFeeDetail[uLen] = feeDetalHtml; uResponse = m_Request.Fee.Set(setValue, out setValue); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS) { MessageBox("新建成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); return; } } } }
protected void Page_Load(object sender, EventArgs e) { 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()); } } 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) { string szDevIDs = Request["devidchk"]; string[] szDevList = szDevIDs.Split(','); uint uFee = Parse(Request["dwUniFee"]); uint uUintTime = Parse(Request["dwUniTime"]); for (int i = 0; i < szDevList.Length; i++) { UNIDEVICE setDev; if (szDevList[i] != "" && getDevByID(szDevList[i].ToString(), out setDev)) { uint uDevKind = (uint)setDev.dwKindID; FEEREQ feeGet = new FEEREQ(); UNIFEE[] feeList; feeGet.dwDevKind = uDevKind; UNIFEE FeeValue = new UNIFEE(); if (m_Request.Fee.Get(feeGet, out feeList) == REQUESTCODE.EXECUTE_SUCCESS && feeList != null && feeList.Length > 0) { //修改 FeeValue = feeList[0]; FEEDETAIL detail = new FEEDETAIL(); detail.dwFeeType = (uint)FEEDETAIL.DWFEETYPE.FEETYPE_USEDEV; detail.dwUnitFee = uFee * 100; detail.dwUnitTime = uUintTime; FeeValue.szFeeDetail = new FEEDETAIL[1]; FeeValue.szFeeDetail[0] = new FEEDETAIL(); FeeValue.szFeeDetail[0] = detail; } else { //新建收费标准 uint?uMax = 0; uint uID = PRFee.FEE_BASE | PRFee.MSREQ_FEE_SET; if (GetMaxValue(ref uMax, uID, "dwFEESN")) { } FeeValue.dwFeeSN = uMax; FeeValue.dwDevKind = uDevKind; FeeValue.dwPriority = 2; FeeValue.dwPurpose = 55; FeeValue.szFeeName = setDev.szDevName.ToString() + "收费标准"; FEEDETAIL detail = new FEEDETAIL(); detail.dwFeeType = (uint)FEEDETAIL.DWFEETYPE.FEETYPE_USEDEV; detail.dwUnitFee = uFee * 100; detail.dwUnitTime = uUintTime; FeeValue.szFeeDetail = new FEEDETAIL[1]; FeeValue.szFeeDetail[0] = new FEEDETAIL(); FeeValue.szFeeDetail[0] = detail; } if (m_Request.Fee.Set(FeeValue, out FeeValue) != REQUESTCODE.EXECUTE_SUCCESS) { Logger.trace(m_Request.szErrMessage); } } } MessageBox("新建成功", "提示", MSGBOX.SUCCESS, MSGBOX_ACTION.OK); return; } m_Title = "新建收费标准"; }