示例#1
0
 public void Accumulate_OnNetworkError(int senderror, HttpExceptionEx ex)
 {
     string str;
     HttpErrorDlg dlg = new HttpErrorDlg();
     base.stbReqStatus.Text = "";
     dlg.ShowHttpError(senderror, ex);
     if (ex == null)
     {
         str = System.Enum.GetNames(typeof(HttpResult))[senderror].ToString();
     }
     else
     {
         str = System.Enum.GetNames(typeof(HttpCause))[(int) ex.Cause].ToString();
     }
     ULogClass.LogWrite("Accumulate_NetworkError Status=" + str);
     dlg.Dispose();
 }
示例#2
0
 public void Logon_AtOnce_OnNetworkError(int senderror, HttpExceptionEx ex)
 {
     try
     {
         string str;
         HttpErrorDlg dlg = new HttpErrorDlg();
         base.stbRepStatus.Text = "";
         dlg.ShowHttpError(senderror, ex);
         if (ex == null)
         {
             str = System.Enum.GetNames(typeof(HttpResult))[senderror].ToString();
         }
         else
         {
             str = System.Enum.GetNames(typeof(HttpCause))[(int) ex.Cause].ToString();
         }
         ULogClass.LogWrite("Logon_AtOnce_NetworkError Status=" + str);
         dlg.Dispose();
         base.UserCode = "";
         base.UserPassword = "";
         base.StatusChange(0);
         base.UserCodeJobSet("");
     }
     finally
     {
         base.Enabled = true;
         if (this.Logonsender != null)
         {
             ((CommonJobForm) this.Logonsender).Enabled = true;
         }
         this.SendRecvDlgHide();
         this.LogonSendFlag = false;
     }
 }
示例#3
0
 private void Http_OnError(IHttpClient sender, string sendkey, HttpExceptionEx ex)
 {
     this.ConnectFlag = false;
     base.Enabled = true;
     if ((base.frmSendRecv != null) && base.frmSendRecv.Visible)
     {
         this.SendRecvDlgHide();
     }
     base.StatusChange(1);
     if (ex.Cause != HttpCause.UserCancel)
     {
         HttpErrorDlg dlg = new HttpErrorDlg();
         dlg.ShowHttpError(ex);
         if (ex.WebStatus == WebExceptionStatus.UnknownError)
         {
             this.CA = null;
         }
         ULogClass.LogWrite("NetworkError Status=" + System.Enum.GetNames(typeof(HttpCause))[(int) ex.Cause].ToString());
         dlg.Dispose();
     }
     if (this.bSendFlag)
     {
         if (ex.Cause != HttpCause.UserCancel)
         {
             base.SendReportDlg.SetStatus(sendkey, USendReportDlg.ReportStatus.Wait, "Failure in Sending.");
         }
         if (base.BatchSendFlag)
         {
             base.BatchSendFlag = false;
             MessageDialog dialog = new MessageDialog();
             if (dialog.ShowMessage("I104", base.SendReportDlg.StatusCount(USendReportDlg.ReportStatus.Sent).ToString(), "") == DialogResult.Yes)
             {
                 base.SendReportDlg.Show();
             }
             dialog.Dispose();
         }
         this.bSendFlag = false;
     }
 }
示例#4
0
 private void CallbackOnError(IHttpClient sender, string sendkey, HttpExceptionEx ex)
 {
     if (ex.Cause != HttpCause.UserCancel)
     {
         this.SendDlgClose();
         HttpErrorDlg dlg = new HttpErrorDlg();
         dlg.ShowHttpError(ex);
         dlg.Dispose();
     }
     this.mGetting = false;
     this.MenuStatusChange();
 }