예제 #1
0
        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);
            }
        }