private void BaseButton_Search_Click(object sender, EventArgs e) { try { if (CommonGlobalUtil.EngineUnconnectioned(this)) { return; } if (isMonth) { startDate = TimeHelper.GetReportMonth(this.dateTimePicker_Start.Value); endDate = TimeHelper.GetReportMonth(this.dateTimePicker_End.Value); } else { startDate = TimeHelper.GetReportDay(this.dateTimePicker_Start.Value); endDate = TimeHelper.GetReportDay(this.dateTimePicker_End.Value); } this.pagePara = new GuideAchievementSummarysPara() { IsMonth = isMonth, StartDate = startDate, EndDate = endDate, //PageIndex = 0, //PageSize = this.pageSize, IsGetGeneralStore = CommonGlobalCache.IsGeneralStoreRetail == "1", ShopID = shopID, GuideID = ValidateUtil.CheckEmptyValue(guideComboBox1.SelectedValue), IsOnlyShowNoZero = this.skinCheckBox_IsOnlyShowNoZero.Checked }; // List<GuideAchievementSummary> GuideAchievementSummarys listPage = CommonGlobalCache.ServerProxy.GetGuideAchievementSummarys(this.pagePara); SetDisplay(); if (listPage != null) { foreach (GuideAchievementSummary item in listPage.List) { item.GuideName = CommonGlobalCache.GetUserName(item.GuideID); item.ShopName = CommonGlobalCache.GetShopName(item.ShopID); } } dataGridViewPagingSumCtrl.BindingDataSource <GuideAchievementSummary>(DataGridViewUtil.ToDataTable <GuideAchievementSummary>(listPage?.List), null, ListSortDirection.Descending, listPage?.Sum); skinSplitContainer1.Panel2Collapsed = true; } catch (Exception ee) { ShowError(ee); } finally { UnLockPage(); } }
private void Initialize() { List <ListItem <int> > stateList = new List <ListItem <int> >(); DateTimeUtil.DateTimePicker_SetDateTimePicker(dateTimePicker_Start, dateTimePicker_End); CommonGlobalUtil.SetTime(skinComboBox_Time); this.pagePara = new GuideAchievementSummarysPara(); this.pagePara2 = new GuideAchievementsPara(); this.dataGridView1.DataSource = null; this.dataGridView2.DataSource = null; // skinLabel4.Visible = !IsPos; this.tabControl1.SelectedTab = tabPage1; skinComboBoxShopID.Initialize(false, CommonGlobalCache.IsGeneralStoreRetail != "1"); skinSplitContainer1.Panel2Collapsed = true; }