/// <summary> /// 从服务器获取数据 /// </summary> protected void LoadData() { try { DataList = PharmacyDatabaseService.QueryPagedUserLogs(out PagerInfo , this.dateTimePickerCreateTimeFrom.Value.Date , this.dateTimePickerCreateTimeTo.Value.Date , DateTime.Now , DateTime.Now.AddDays(-1) , this.textBoxContent.Text , this.pagerControl1.PageIndex , AppConfig.Config.PageSize); string msg = string.Empty; pStores = PharmacyDatabaseService.AllStores(out msg); pUsers = PharmacyDatabaseService.AllUsers(out msg); //DataList.ToList().Sort(new MyComparer()); } catch (Exception ex) { DataList = null; ex = new Exception("获取日志列表失败", ex); Log.Error(ex); MessageBox.Show(this.Text + ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/// <summary> /// 画面初始化 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FormRetailOrderIndex_Load(object sender, EventArgs e) { try { string msg = string.Empty; storeList = PharmacyDatabaseService.AllStores(out msg).ToList(); BindGridView(); } catch (Exception ex) { Log.Error(ex); MessageBox.Show("窗体加载失败!!!", "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/// <summary> /// 画面初始化 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FormRetailOrderIndex_Load(object sender, EventArgs e) { try { //客户类型初始化 this.cmbRetailCustomerType.DataSource = Utility.CreateComboboxList <RetailCustomerType>(); this.cmbRetailCustomerType.DisplayMember = "Name"; this.cmbRetailCustomerType.ValueMember = "ID"; //付款方式初始化 this.cmbRetailPaymentMethod.DataSource = Utility.CreateComboboxList <RetailPaymentMethod>(); this.cmbRetailPaymentMethod.DisplayMember = "Name"; this.cmbRetailPaymentMethod.ValueMember = "ID"; string msg = string.Empty; storeList = PharmacyDatabaseService.AllStores(out msg).ToList(); } catch (Exception ex) { Log.Error(ex); MessageBox.Show(ex.Message, "错误", MessageBoxButtons.OK, MessageBoxIcon.Error); } }