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); }
public RTBILL[] GetUniFeeVT(out uint uTotal) { string szId = Request["id"]; uTotal = 0; REQUESTCODE uResponse = REQUESTCODE.EXECUTE_FAIL; RTRESVBILLREQ vrGet = new RTRESVBILLREQ(); vrGet.dwResvID = (uint.Parse(szId)); RTRESVBILL vtRes = new RTRESVBILL(); uResponse = m_Request.Reserve.GetRTResvBill(vrGet, out vtRes); ArrayList list = new ArrayList(); if (uResponse == REQUESTCODE.EXECUTE_SUCCESS) { RTBILL[] vtFeeDetail = vtRes.BillInfo; for (int i = 0; vtFeeDetail != null && i < vtFeeDetail.Length; i++) { RTBILL billTem = new RTBILL(); billTem = vtFeeDetail[i]; uint uFeeType = (uint)vtFeeDetail[i].dwFeeType; uint uFee = ((uint)vtFeeDetail[i].dwUnitFee / 100); billTem.dwFeeType = (uFeeType); billTem.dwUnitFee = (uFee); billTem.dwPayKind = (payType); billTem.dwResvID = (uint.Parse(szId)); double uReal = 0; if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_USEDEV)) { double.TryParse(lblUseDevTotalReal.Text.ToString(), out uReal); } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_OCCUPY)) { double.TryParse(lblOccupyTotalReal.Text.ToString(), out uReal); } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_ASSIST)) { double.TryParse(lblASSISTotalReal.Text.ToString(), out uReal); } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_TIMEOUT)) { double.TryParse(lblTIMEOUTTotalReal.Text.ToString(), out uReal); } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_SAMPLE)) { double.TryParse(lblCONSUMABLETotalReal.Text.ToString(), out uReal); } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_SAMPLE)) { double.TryParse(lblSampleTotalReal.Text.ToString(), out uReal); } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_RESVDEV)) { double.TryParse(lblRESVDEVTotalReal.Text.ToString(), out uReal); } else if ((uFeeType == (uint)FEEDETAIL.DWFEETYPE.FEETYPE_ENTRUST)) { double.TryParse(lblENTRUSTTotalReal.Text.ToString(), out uReal); } uint uTemp = (uint)(uReal * 100); uTotal = uTotal + uTemp; billTem.dwRealCost = (uTemp); list.Add(billTem); } } RTBILL[] vtFeeDetailRes = new RTBILL[list.Count]; for (int i = 0; i < list.Count; i++) { vtFeeDetailRes[i] = new RTBILL(); vtFeeDetailRes[i] = (RTBILL)list[i]; } return(vtFeeDetailRes); }