Beispiel #1
0
        private void getAndSetDataStoragePath(DataSourceEntities entitiesDataSource, string dataNum)
        {
            string addr1 = "", addr2 = "", recAddr = "";

            var queriedBianMuEnumerator = entitiesDataSource.W_SJZYZTSXXX.Where(rec => (!string.IsNullOrEmpty(dataNum) && dataNum.Equals(rec.F_DATANUM)));

            var targetBianMu            = queriedBianMuEnumerator.FirstOrDefault();

            if (null == targetBianMu)
            {
                var message = "没有查询到指定类型的编目信息,请联系开发人员或手工指定提取数据位置";
                MessageUtil.DoSetTBDetail(message);
                MessageBox.Show(message);
            }
            else
            {
                addr1 = targetBianMu.F_ONEADDRESS;
                if (!string.IsNullOrEmpty(addr1))
                {
                    addr1 = addr1.Trim();
                }

                addr2 = targetBianMu.F_TWOADDRESS;
                if (!string.IsNullOrEmpty(addr2))
                {
                    addr2 = addr2.Trim();
                }

                recAddr = targetBianMu.F_RECOVERYADDRESS;
                if (!string.IsNullOrEmpty(recAddr))
                {
                    recAddr = recAddr.Trim();
                }
            }

            tbAddr1.Text   = addr1;
            tbAddr2.Text   = addr2;
            tbRecAddr.Text = recAddr;
        }