Пример #1
0
        public void ShowEmployeeTypeList()
        {
            wsMDL.IwsMDLClient client = new wsMDL.IwsMDLClient();
            try
            {
                baseForm.SetCursor();
                DataSet ds = client.GetEmployeeTypeRecords(baseForm.CurrentContextInfo, QueryParameters.ToArray<MESParameterInfo>());
                this.gridEmployeeTypeList.DataSource = ds.Tables[0];
                if (ds.Tables[0].Rows.Count > 0)
                {
                    this.ucToolbarEmployeeTypeList.SetToolbarWithRows();
                }
                else
                {
                    this.ucToolbarEmployeeTypeList.SetToolbarWithoutRows();
                }

                this.ucStatusBarEmployeeTypeList.ShowText1(UtilCulture.GetString("Msg.R00006") + ": " + ds.Tables[0].Rows.Count.ToString());
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                baseForm.ResetCursor();
                baseForm.CloseWCF(client);
            }
        }
Пример #2
0
 private DataTable GetEmployeeType()
 {
     wsMDL.IwsMDLClient client = new wsMDL.IwsMDLClient();
     DataTable dt = null;
     try
     {
         dt = client.GetEmployeeTypeRecords(baseForm.CurrentContextInfo, (new List<MESParameterInfo>()).ToArray<MESParameterInfo>()).Tables[0];
     }
     catch (Exception ex)
     {
         throw ex;
     }
     finally
     {
         baseForm.CloseWCF(client);
     }
     return dt;
 }