protected override void ShowListWithFilteredQuery() { QueryCondition qCondition = new QueryCondition { startTime = string.Empty, endTime = string.Empty, invType = string.Empty, status = string.Empty }; List <OneTypeVolumes> queryList = new List <OneTypeVolumes>(); QueryConfirmCommon.QueryController(qCondition, queryList, false); List <string> list2 = new List <string>(); List <string> list3 = new List <string> { "1", "0" }; foreach (OneTypeVolumes volumes in queryList) { string type = ApplyCommon.Invtype2CodeMix(volumes.invType); if (ApplyCommon.IsHxInvType(type)) { if (list2.IndexOf(volumes.applyStatus) != -1) { base.volumeList.Add(volumes); } } else if (ApplyCommon.IsZcInvType(type) && (list3.IndexOf(volumes.applyStatus) != -1)) { base.volumeList.Add(volumes); } } }
public static void QueryController(QueryCondition qCondition, List <OneTypeVolumes> queryList, bool isConfirmQuery) { string invType = qCondition.invType; if (ApplyCommon.IsHxInvType(invType)) { HxQueryOperate(qCondition, queryList, isConfirmQuery); } else if (ApplyCommon.IsZcInvType(invType)) { ZcQueryOperate(qCondition, queryList, isConfirmQuery); } else if (ApplyCommon.IsAllType(invType)) { if (ApplyCommon.HasHxAuthorization() && ApplyCommon.HasZcAuthorization()) { HxQueryOperate(qCondition, queryList, isConfirmQuery); ZcQueryOperate(qCondition, queryList, isConfirmQuery); } else if (ApplyCommon.HasHxAuthorization()) { HxQueryOperate(qCondition, queryList, isConfirmQuery); } else if (ApplyCommon.HasZcAuthorization()) { ZcQueryOperate(qCondition, queryList, isConfirmQuery); } } }
private bool RevokeVolumes(string invTypeName, string applySeqNum, string applyTypeCode, string applyAmount) { if (ApplyCommon.IsHxInvType(invTypeName)) { XmlDocument document = this.CreateHxRevokeInput(applySeqNum, applyTypeCode, applyAmount); if (this.logFlag) { document.Save(this.logPath + "HxRevokeInput.xml"); } string xml = string.Empty; if (HttpsSender.SendMsg("0041", document.InnerXml, ref xml) != 0) { MessageManager.ShowMsgBox(xml); return(false); } XmlDocument docFeedback = new XmlDocument(); docFeedback.LoadXml(xml); if (this.logFlag) { docFeedback.Save(this.logPath + @"\HxRevokeOutput.xml"); } string msg = string.Empty; if (!this.ParseHxRevokeOutput(docFeedback, out msg)) { MessageManager.ShowMsgBox(msg); return(false); } return(true); } if (ApplyCommon.IsZcInvType(invTypeName)) { XmlDocument document3 = this.CreateZcRevokeInput(applySeqNum); if (this.logFlag) { document3.Save(this.logPath + "ZcRevokeInput.xml"); } string str3 = string.Empty; if (HttpsSender.SendMsg("0042", document3.InnerXml, ref str3) != 0) { MessageManager.ShowMsgBox(str3); return(false); } XmlDocument document4 = new XmlDocument(); document4.LoadXml(str3); if (this.logFlag) { document4.Save(this.logPath + @"\ZcRevokeOutput.xml"); } string str4 = string.Empty; if (!this.ParseZcRevokeOutput(document4, out str4)) { MessageManager.ShowMsgBox(str4); return(false); } return(true); } MessageManager.ShowMsgBox("INP-441200"); return(false); }
private void csdgStatusVolumn_MouseDoubleClick(object sender, MouseEventArgs e) { DataGridViewRow row = base.csdgStatusVolumn.SelectedRows[0]; string applySeqNum = row.Cells["SLXH"].Value.ToString(); string applyTypeCode = row.Cells["FPZLDM"].Value.ToString(); string applyAmount = row.Cells["SLSL"].Value.ToString(); string invTypeName = ApplyCommon.Invtype2CodeMix(row.Cells["FPZL"].Value.ToString()); if ((DialogResult.Yes == MessageManager.ShowMsgBox("INP-4412AA")) && this.RevokeVolumes(invTypeName, applySeqNum, applyTypeCode, applyAmount)) { MessageManager.ShowMsgBox("INP-4412AJ"); base.volumeList.RemoveAt(base.csdgStatusVolumn.SelectedRows[0].Index); base.BindData(base.volumeList); } }
protected override void ShowListWithFilteredQuery() { QueryCondition qCondition = new QueryCondition { startTime = string.Empty, endTime = string.Empty, invType = string.Empty, status = "1" }; List <OneTypeVolumes> queryList = new List <OneTypeVolumes>(); QueryConfirmCommon.QueryController(qCondition, queryList, true); foreach (OneTypeVolumes volumes in queryList) { if (!ApplyCommon.Invtype2CodeMix(volumes.invType).Equals("026")) { base.volumeList.Add(volumes); } } }
private static bool ParseZCQueryStateOutput(XmlDocument doc, out string msg, List <OneTypeVolumes> applyQueryList, bool isConfirmQuery) { try { XmlNode node = doc.SelectSingleNode("//returnCode"); XmlNode node2 = doc.SelectSingleNode("//returnMessage"); if (!node.InnerText.Equals("00")) { msg = node2.InnerText; return(false); } Dictionary <string, string> zCTypeCodeNamePairs = GetZCTypeCodeNamePairs(); XmlNode node3 = doc.SelectSingleNode("//slxx"); if (node3 != null) { foreach (XmlNode node4 in node3.ChildNodes) { OneTypeVolumes item = new OneTypeVolumes(); foreach (XmlNode node5 in node4.ChildNodes) { if (node5.Name.Equals("fplx_dm")) { item.invType = ApplyCommon.Code2InvtypeMix(node5.InnerText); } else if (node5.Name.Equals("fpzl_dm")) { item.typeCode = node5.InnerText; if (zCTypeCodeNamePairs.Keys.Contains <string>(node5.InnerText)) { item.typeName = zCTypeCodeNamePairs[node5.InnerText]; } } else if (node5.Name.Equals("slsl")) { item.applyAmount = node5.InnerText; } else if (node5.Name.Equals("slsj")) { string innerText = node5.InnerText; if (14 == innerText.Length) { int year = Convert.ToInt32(innerText.Substring(0, 4)); int month = Convert.ToInt32(innerText.Substring(4, 2)); int day = Convert.ToInt32(innerText.Substring(6, 2)); int hour = Convert.ToInt32(innerText.Substring(8, 2)); int minute = Convert.ToInt32(innerText.Substring(10, 2)); int second = Convert.ToInt32(innerText.Substring(12, 2)); item.applyTime = new DateTime(year, month, day, hour, minute, second).ToString("yyyy-MM-dd HH:mm:ss"); } else { item.applyTime = innerText; } } else if (node5.Name.Equals("slxh")) { item.applyNum = node5.InnerText; } else if (node5.Name.Equals("clzt")) { item.applyStatus = node5.InnerText; } else if (node5.Name.Equals("clxx")) { item.applyStatusMsg = node5.InnerText; } else if (node5.Name.Equals("clsj")) { string str2 = node5.InnerText; if (14 == str2.Length) { int num7 = Convert.ToInt32(str2.Substring(0, 4)); int num8 = Convert.ToInt32(str2.Substring(4, 2)); int num9 = Convert.ToInt32(str2.Substring(6, 2)); int num10 = Convert.ToInt32(str2.Substring(8, 2)); int num11 = Convert.ToInt32(str2.Substring(10, 2)); int num12 = Convert.ToInt32(str2.Substring(12, 2)); item.dealTime = new DateTime(num7, num8, num9, num10, num11, num12).ToString("yyyy-MM-dd HH:mm:ss"); } else { item.dealTime = str2; } } else if (node5.Name.Equals("ysqbh")) { item.dealNum = node5.InnerText; } else if (node5.Name.Equals("qrjg")) { if (node5.InnerText.Equals("1")) { item.isConfirmed = true; } else { item.isConfirmed = false; } } else if (node5.Name.Equals("sljgmx")) { foreach (XmlNode node6 in node5.ChildNodes) { Volumn volumn = new Volumn(); foreach (XmlNode node7 in node6.ChildNodes) { if (node7.Name.Equals("fpdm")) { volumn.typeCode = node7.InnerText; } else if (node7.Name.Equals("qshm")) { volumn.startNum = node7.InnerText; } else if (node7.Name.Equals("zzhm")) { volumn.endNum = node7.InnerText; } else if (node7.Name.Equals("fs")) { volumn.count = node7.InnerText; } } item.volumns.Add(volumn); } } } if (!isConfirmQuery || !item.isConfirmed) { applyQueryList.Add(item); } } } msg = string.Empty; return(true); } catch (BaseException exception) { ExceptionHandler.HandleError(exception); msg = exception.Message; return(false); } catch (Exception exception2) { ExceptionHandler.HandleError(exception2); msg = exception2.Message; return(false); } }
private static bool ParseHXQueryStateOutput(XmlDocument doc, out string msg, List <OneTypeVolumes> applyQueryList, bool isConfirmQuery) { try { XmlNode node = doc.SelectSingleNode("//CODE"); XmlNode node2 = doc.SelectSingleNode("//MESS"); if (!node.InnerText.Equals("0000")) { msg = node2.InnerText; return(false); } foreach (XmlNode node4 in doc.SelectSingleNode("//DATA").SelectNodes("//SLXX")) { if (!string.IsNullOrEmpty(node4.InnerText)) { OneTypeVolumes item = new OneTypeVolumes(); foreach (XmlNode node5 in node4.ChildNodes) { if (node5.Name.Equals("FPZL")) { item.invType = ApplyCommon.Code2InvtypeMix(node5.InnerText); } else if (node5.Name.Equals("FPZLDM")) { item.typeCode = node5.InnerText; } else if (node5.Name.Equals("FPZLMC")) { item.typeName = node5.InnerText; } else if (node5.Name.Equals("SLSL")) { item.applyAmount = node5.InnerText; } else if (node5.Name.Equals("SQSJ")) { string innerText = node5.InnerText; if (14 == innerText.Length) { int year = Convert.ToInt32(innerText.Substring(0, 4)); int month = Convert.ToInt32(innerText.Substring(4, 2)); int day = Convert.ToInt32(innerText.Substring(6, 2)); int hour = Convert.ToInt32(innerText.Substring(8, 2)); int minute = Convert.ToInt32(innerText.Substring(10, 2)); int second = Convert.ToInt32(innerText.Substring(12, 2)); item.applyTime = new DateTime(year, month, day, hour, minute, second).ToString("yyyy-MM-dd HH:mm:ss"); } else { item.applyTime = innerText; } } else if (node5.Name.Equals("SLXH")) { item.applyNum = node5.InnerText; } else if (node5.Name.Equals("SLZT")) { item.applyStatus = node5.InnerText; } else if (node5.Name.Equals("CLXX")) { item.applyStatusMsg = node5.InnerText; } else if (node5.Name.Equals("CLSJ")) { string str2 = node5.InnerText; if (14 == str2.Length) { int num7 = Convert.ToInt32(str2.Substring(0, 4)); int num8 = Convert.ToInt32(str2.Substring(4, 2)); int num9 = Convert.ToInt32(str2.Substring(6, 2)); int num10 = Convert.ToInt32(str2.Substring(8, 2)); int num11 = Convert.ToInt32(str2.Substring(10, 2)); int num12 = Convert.ToInt32(str2.Substring(12, 2)); item.dealTime = new DateTime(num7, num8, num9, num10, num11, num12).ToString("yyyy-MM-dd HH:mm:ss"); } else { item.dealTime = str2; } } else if (node5.Name.Equals("YSQBH")) { item.dealNum = node5.InnerText; } else if (node5.Name.Equals("SLQRBZ")) { if (node5.InnerText.Equals("Y")) { item.isConfirmed = true; } else { item.isConfirmed = false; } } else if (node5.Name.Equals("FPJXX")) { Volumn volumn = new Volumn(); foreach (XmlNode node6 in node5.ChildNodes) { if (node6.Name.Equals("FPDM")) { volumn.typeCode = node6.InnerText; } else if (node6.Name.Equals("QSHM")) { volumn.startNum = node6.InnerText; } else if (node6.Name.Equals("ZZHM")) { volumn.endNum = node6.InnerText; } else if (node6.Name.Equals("FS")) { volumn.count = node6.InnerText; } } item.volumns.Add(volumn); } } if (!isConfirmQuery || !item.isConfirmed) { applyQueryList.Add(item); } } } msg = string.Empty; return(true); } catch (BaseException exception) { ExceptionHandler.HandleError(exception); msg = exception.Message; return(false); } catch (Exception exception2) { ExceptionHandler.HandleError(exception2); msg = exception2.Message; return(false); } }
private void csdgStatusVolumn_MouseDoubleClick(object sender, MouseEventArgs e) { DataGridViewRow row = base.csdgStatusVolumn.SelectedRows[0]; DialogResult result = new ApplyConfirm(row.Cells["SLXH"].Value.ToString(), ApplyCommon.Invtype2CodeMix(row.Cells["FPZL"].Value.ToString())).ShowDialog(); if (DialogResult.Yes == result) { MessageManager.ShowMsgBox("INP-4412AI"); base.volumeList.RemoveAt(base.csdgStatusVolumn.SelectedRows[0].Index); base.BindData(base.volumeList); } }
private void btnConfirm_Click(object sender, EventArgs e) { if (this.confirmList.SelectedRows.Count <= 0) { MessageManager.ShowMsgBox("INP-441209", new string[] { "待确认" }); } else { this.confirmList.CurrentCell = this.confirmList.Rows[0].Cells[0]; this.confirmList.CurrentCell = this.confirmList.Rows[0].Cells[1]; int lineNum = 0; string emptyName = string.Empty; if (this.contentEmptyCheck(out lineNum, out emptyName)) { MessageManager.ShowMsgBox("INP-4412A9", new string[] { lineNum.ToString(), emptyName }); } else { XmlDocument document = null; bool flag2 = false; if (ApplyCommon.IsHxInvType(this.invType)) { document = this.CreateHXConfirmInput(); if (this.logFlag) { document.Save(this.logPath + "HxConfirmInput.xml"); } string xml = string.Empty; if (HttpsSender.SendMsg("0038", document.InnerXml, ref xml) != 0) { MessageManager.ShowMsgBox(xml); return; } XmlDocument docFeedback = new XmlDocument(); docFeedback.LoadXml(xml); if (this.logFlag) { docFeedback.Save(this.logPath + @"\HxConfirmOutput.xml"); } string msg = string.Empty; bool flag3 = this.ParseHXConfirmOutput(docFeedback, out msg); flag2 = flag3; if (!flag3) { MessageManager.ShowMsgBox(msg); return; } } else if (ApplyCommon.IsZcInvType(this.invType)) { document = this.CreateZCConfirmInput(); if (this.logFlag) { document.Save(this.logPath + "ZcConfirmInput.xml"); } string str4 = string.Empty; if (HttpsSender.SendMsg("0039", document.InnerXml, ref str4) != 0) { MessageManager.ShowMsgBox(str4); return; } XmlDocument document3 = new XmlDocument(); document3.LoadXml(str4); if (this.logFlag) { document3.Save(this.logPath + @"\ZcConfirmOutput.xml"); } string str5 = string.Empty; bool flag4 = this.ParseZCConfirmOutput(document3, out str5); flag2 = flag4; if (!flag4) { MessageManager.ShowMsgBox(str5); return; } } if (flag2) { base.DialogResult = DialogResult.Yes; } else { base.DialogResult = DialogResult.No; } base.Close(); } } }