private void GetData(List<MESParameterInfo> lstParameters) { wsINP.IwsINPClient client = new wsINP.IwsINPClient(); try { baseForm.SetCursor(); DataSet ds = client.GetPricingRecords(baseForm.CurrentContextInfo, lstParameters.ToArray<MESParameterInfo>()); this.grdPricing.SetDataBinding(ds.Tables[0], ""); if (ds.Tables[0].Rows.Count < 1) { this.ucToolbar1.SetToolbarWithoutRows(); } else { this.ucToolbar1.SetToolbarWithRows(); } } catch (Exception ex) { MESMsgBox.ShowError(ExceptionParser.Parse(ex)); } finally { baseForm.ResetCursor(); baseForm.CloseWCF(client); } }
public void DoShowSingleObject(List<MESParameterInfo> lstParameters) { wsINP.IwsINPClient client = new wsINP.IwsINPClient(); try { baseForm.SetCursor(); #region Show to UI tinppricing prc = client.GetSinglePricing(baseForm.CurrentContextInfo, lstParameters.ToArray<MESParameterInfo>()); if (prc == null) return; baseForm.ShowSingleObjectToUI<tinppricing>(prc, this); OriginalPricing = prc; #endregion #region Show pricing detail List<MESParameterInfo> lstParameter = new List<MESParameterInfo>() { new MESParameterInfo() { ParamName="prisysid", ParamValue=prc.prisysid, ParamType="string" } }; DataSet ds = client.GetPricingRecords(baseForm.CurrentContextInfo, lstParameter.ToArray<MESParameterInfo>()); this.grdDetail.DataSource = ds.Tables[0]; #endregion } catch (Exception ex) { MESMsgBox.ShowError(ExceptionParser.Parse(ex)); } finally { baseForm.ResetCursor(); baseForm.CloseWCF(client); } }
public void DoShowEmptyData() { wsINP.IwsINPClient client = new wsINP.IwsINPClient(); try { baseForm.SetCursor(); #region Show flow List<MESParameterInfo> lstParameter = new List<MESParameterInfo>() { new MESParameterInfo() { ParamName="prisysid", ParamValue=MES_DummyData.Dummy_Data_XXX_111.ToString(), ParamType="string" } }; DataSet ds = client.GetPricingRecords(baseForm.CurrentContextInfo, lstParameter.ToArray<MESParameterInfo>()); this.grdDetail.DataSource = ds.Tables[0]; #endregion } catch (Exception ex) { MESMsgBox.ShowError(ExceptionParser.Parse(ex)); } finally { baseForm.ResetCursor(); baseForm.CloseWCF(client); } }