Esempio n. 1
0
        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);
                }
            }
        }
        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);
                }
            }
        }
 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);
 }
Esempio n. 4
0
 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();
         }
     }
 }