Beispiel #1
0
 /// <summary>
 /// 从服务器获取所有经营范围
 /// </summary>
 /// <param name="showMessage"></param>
 /// <returns></returns>
 public bool LoadBusinessTypes(bool showMessage = false)
 {
     try
     {
         string message;
         BusinessTypes = PharmacyDatabaseService.AllBusinessTypes(out message)
                         .ToList();
         if (BusinessScopes != null && string.IsNullOrWhiteSpace(message))
         {
             return(true);
         }
         else
         {
             throw new Exception(message);
             return(false);
         }
     }
     catch (Exception ex)
     {
         Log.Error(ex);
         if (showMessage)
         {
             //MessageBox.Show(ex.Message, this.Text, MessageBoxButtons.OK, MessageBoxIcon.Stop);
             MessageBox.Show(this.Text + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Stop);
         }
         return(false);
     }
 }
Beispiel #2
0
        /// <summary>
        /// 获取经营方式
        /// </summary>
        private void GetBusinessType()
        {
            string msg = string.Empty;

            _ListbussNessType = PharmacyDatabaseService.AllBusinessTypes(out msg).ToList();
            foreach (BusinessType bt in _ListbussNessType)
            {
                dicbussnessType.Add(bt.Id, bt.Name);
            }
        }