Ejemplo n.º 1
0
 private DataSet GetWorkGroupRecordsByStep(string step)
 {
     wsMDL.IwsMDLClient client = new wsMDL.IwsMDLClient();
     DataSet ds = null;
     try
     {
         baseForm.SetCursor();
         List<MESParameterInfo> lstParameters = new List<MESParameterInfo>();
         lstParameters.Add(new MESParameterInfo()
         {
             ParamName = "step",
             ParamValue = step,
             ParamType = "string"
         });
         ds = client.GetWorkGroupRecords(baseForm.CurrentContextInfo, lstParameters.ToArray<MESParameterInfo>());
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         baseForm.ResetCursor();
         baseForm.CloseWCF(client);
     }
     return ds;
 }
Ejemplo n.º 2
0
 private DataTable GetWorkGroup()
 {
     wsMDL.IwsMDLClient client = new wsMDL.IwsMDLClient();
     DataTable dt = null;
     try
     {
         dt = client.GetWorkGroupRecords(baseForm.CurrentContextInfo, (new List<MESParameterInfo>()).ToArray<MESParameterInfo>()).Tables[0];
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         baseForm.CloseWCF(client);
     }
     return dt;
 }
Ejemplo n.º 3
0
        private void GetData(List<MESParameterInfo> lstParameters)
        {
            wsMDL.IwsMDLClient client = new wsMDL.IwsMDLClient();
            try
            {
                baseForm.SetCursor();

                DataSet ds = client.GetWorkGroupRecords(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);
            }
        }