コード例 #1
0
        private void GetData(List<MESParameterInfo> lstParameters)
        {
            wsINP.IwsINPClient client = new wsINP.IwsINPClient();
            try
            {
                baseForm.SetCursor();

                DataSet ds = client.GetRepairHisRecords(baseForm.CurrentContextInfo, lstParameters.ToArray<MESParameterInfo>());

                this.grdQuery.SetDataBinding(ds.Tables[0], "");

                if (this.grdQuery.Rows.Count < 1)
                {
                    this.ucToolbar1.SetToolbarWithoutRows();
                }
                else
                {
                    this.ucToolbar1.SetToolbarWithRows();
                }

                this.ucStatusBar1.ShowText1(UtilCulture.GetString("Msg.R00006") + ": " + ds.Tables[0].Rows.Count.ToString());
            }
            catch (Exception ex)
            {
                MESMsgBox.ShowError(ExceptionParser.Parse(ex));
            }
            finally
            {
                baseForm.ResetCursor();
                baseForm.CloseWCF(client);
            }
        }
コード例 #2
0
ファイル: frmRepairRpt.cs プロジェクト: jimidzj/Inspect
 private DataTable GetRepairFailed(string custorderno)
 {
     wsINP.IwsINPClient client = new wsINP.IwsINPClient();
     DataTable dt = null;
     try
     {
         List<MESParameterInfo> lstParams = new List<MESParameterInfo>() {
                     new MESParameterInfo(){ParamName="custorderno",ParamValue=custorderno},
                     new MESParameterInfo(){ParamName="reptype",ParamValue=MES_RepairType.RepairFail.ToString()}
                 };
         dt = client.GetRepairHisRecords(baseForm.CurrentContextInfo, lstParams.ToArray<MESParameterInfo>()).Tables[0];
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         baseForm.CloseWCF(client);
     }
     return dt;
 }