コード例 #1
0
        private void GetListQueryData()
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;

                bool   bResult = false;
                string strErr  = string.Empty;

                bResult = Basic_Func.GetPreparationList(ref lstPreparation, _preparation, ref strErr);
                ckLstBoxPreparation.DataSource    = lstPreparation;
                ckLstBoxPreparation.DisplayMember = "pCode";
                ckLstBoxPreparation.ValueMember   = "bid";

                bResult = Basic_Func.GetBuildingList(ref lstBuilding, _building, ref strErr);
                lstBoxBuilding.DataSource    = lstBuilding;
                lstBoxBuilding.DisplayMember = "bName";
                lstBoxBuilding.ValueMember   = "bNo";

                if (!bResult || !string.IsNullOrEmpty(strErr))
                {
                    Common.Common_Func.ErrorMessage(strErr, "查询失败");
                }
            }
            catch (Exception ex)
            {
                Common.Common_Func.ErrorMessage(ex.Message, "查询失败");
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }