private void CheckCashierForm_Load(object sender, EventArgs e) { tempVoList = SelectDao.SelectData <TempOrderVo>(); this.gridView1.BestFitColumns(); this.gridControl1.DataSource = tempVoList; this.gridControl1.RefreshDataSource(); }
protected override void BtnSave_Click(object sender, EventArgs e) { List <StaffClassVo> staffOldInfoList = SelectDao.SelectData <StaffClassVo>(); List <StaffClassVo> changeList = GenericUtil.GetChanges(classList, staffOldInfoList); int result = 0; if (!CheckParam(changeList)) { return; } foreach (StaffClassVo vo in changeList) { if (SelectDao.IsRepeatedClassId(vo.StaffClassID)) { //更新 result = UpdateDao.UpdateByID(vo); if (result <= 0) { XtraMessageBox.Show(vo.StaffClassID + "更新失败!"); break; } } else { vo.CompanyId = SystemConst.companyId; result = InsertDao.InsertData(vo); if (result <= 0) { XtraMessageBox.Show(vo.StaffClassID + "保存失败!"); break; } } } XtraMessageBox.Show("保存成功!"); }
private void FillUser() { List <UserRoleVo> voList = SelectDao.SelectData <UserRoleVo>(); this.gridControl2.DataSource = voList; this.gridControl2.RefreshDataSource(); }
private void SetCardInfoGrid() { GridViewUtil.InitGridView(this.gridView1, typeof(CardVo)); cardVoList = SelectDao.SelectData <CardVo>(); this.gridControl1.DataSource = cardVoList; this.gridControl1.RefreshDataSource(); }
//刷新服务 private void RefreshSkill() { List <SkillVo> voList = SelectDao.SelectData <SkillVo>(); this.gridControl1.DataSource = voList; this.gridControl1.RefreshDataSource(); }
private void FillPermission() { List <PermissionVo> voList = SelectDao.SelectData <PermissionVo>(); this.gridControl1.DataSource = voList; this.gridControl1.RefreshDataSource(); }
private void FillRoom() { List <RoomVo> voList = SelectDao.SelectData <RoomVo>(); this.gridControl2.DataSource = voList; this.gridControl2.RefreshDataSource(); }
public void 日营业报表() { List <SalesVo> salesVoList = new List <SalesVo>(); List <OrderInfoVo> orderVoList = SelectDao.SelectData <OrderInfoVo>(); var orderDic = orderVoList.GroupBy(v => v.EndTime.Date).ToDictionary(v => v.First().EndTime, v => v.ToList()); foreach (var key in orderDic.Keys) { SalesVo vo = new SalesVo(); vo.Date = key.Date; foreach (var item in orderDic[key]) { if (item.PriceType.Equals("现金")) { vo.Cash += item.Price; } else if (item.PriceType.Equals("Visa卡")) { vo.CCard += item.Price; } else { vo.MemberUse += item.Price; } vo.Gst += item.Tax; vo.Sales += item.TotalPrice; } salesVoList.Add(vo); } reportControl.SetSalesData(salesVoList); }
private void RefreshStaffQueue() { List <StaffQueueVo> voList = SelectDao.SelectData <StaffQueueVo>(); this.gridControl1.DataSource = voList; this.gridControl1.RefreshDataSource(); }
public ConsumeInfoUI() { InitializeComponent(); GridViewUtil.InitGridView(this.gridView1, typeof(MemberConsumeVo)); consumeVoList = SelectDao.SelectData <MemberConsumeVo>(); this.gridControl1.DataSource = consumeVoList; this.gridControl1.RefreshDataSource(); }
private void RefreshSkill() { List <SkillVo> voList = SelectDao.SelectData <SkillVo>(); this.gridControl2.DataSource = voList; this.gridView2.BestFitColumns(); this.gridControl2.RefreshDataSource(); }
public void RefeshStaffInfo() { DataTable dt = SelectDao.SelectData(typeof(StaffWorkInfoVo)); this.gridControl1.DataSource = dt; this.gridControl1.RefreshDataSource(); this.gridView1.BestFitColumns(); }
private void RefreshMember() { memberVoList.Clear(); memberVoList = SelectDao.SelectData <MemberInfoVo>(); this.gridControl1.DataSource = memberVoList; this.gridControl1.RefreshDataSource(); this.gridView1.BestFitColumns(); }
private void FillMemberLevel() { List <CardVo> cardDaoList = SelectDao.SelectData <CardVo>(); foreach (CardVo vo in cardDaoList) { this.comCardLevel.Properties.Items.Add(vo.CardName); } }
public StaffWorkQueryUI() { EventBus.RegisterEvent(this); InitializeComponent(); InitEvents(); GridViewUtil.InitGridView(this.gridView1, typeof(StaffWorkRecordVo)); staffRecordList = SelectDao.SelectData <StaffWorkRecordVo>(); this.gridControl1.DataSource = staffRecordList; this.gridControl1.RefreshDataSource(); }
private void FillPriceType() { this.comboType.Properties.Items.AddRange(new string[] { "现金", "Visa卡" }); List <CardVo> cardList = SelectDao.SelectData <CardVo>(); foreach (CardVo vo in cardList) { this.comboType.Properties.Items.Add(vo.CardName); } this.comboType.SelectedIndex = 0; }
private void FillSKill() { List <SkillVo> voList = SelectDao.SelectData <SkillVo>(); this.gridControl1.DataSource = voList; this.gridControl1.RefreshDataSource(); //this.gridView1.Columns["SkillId"].Visible = false; //this.gridView1.Columns["SecondName"].Visible = false; //this.gridView1.Columns["ServerTime"].Visible = false; //this.gridView1.Columns["Remark"].Visible = false; }
private void RefreshRoom() { roomVoList = SelectDao.SelectData <RoomVo>(); List <Room> roomList = new List <Room>(); this.gridControl2.DataSource = roomVoList; this.gridControl2.RefreshDataSource(); foreach (RoomVo vo in roomVoList) { roomList.Add(new Room(vo)); } clockRoom.SetRoomList(roomList); }
private void BtnLook_Click(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(this.textEdit1.Text)) { staffRecordList = SelectDao.SelectData <StaffWorkRecordVo>(); } else { staffRecordList = staffRecordList.Where(v => v.StaffName == this.textEdit1.Text).ToList(); } this.gridControl1.DataSource = staffRecordList; this.gridControl1.RefreshDataSource(); }
private void FillComboStaff() { List <StaffQueueVo> voList = SelectDao.SelectData <StaffQueueVo>(); if (voList.Count == 0) { return; } foreach (StaffQueueVo vo in voList) { string temp = vo.StaffName; comboStaff.Properties.Items.Add(temp); } comboStaff.SelectedIndex = 0; }
private void BtnQuery_Click(object sender, EventArgs e) { DateTime startTime = dateTimeStart.Value.Date; DateTime endTime = dateTimeEnd.Value.Date.AddHours(23).AddMinutes(59).AddSeconds(59); if (this.gridView1.ViewCaption.Equals("订单")) { List <OrderInfoVo> orderList = SelectDao.SelectData <OrderInfoVo>("EndTime> '" + startTime + "' and EndTime<='" + endTime + "'"); GridViewUtil.InitGridView(this.gridView1, typeof(OrderInfoVo)); this.gridControl1.DataSource = orderList; } if (this.gridView1.ViewCaption.Equals("详细订单")) { List <DetailedOrderVo> delorderList = SelectDao.SelectData <DetailedOrderVo>("EndTime> '" + startTime + "' and EndTime<='" + endTime + "'"); GridViewUtil.InitGridView(this.gridView1, typeof(DetailedOrderVo)); this.gridControl1.DataSource = delorderList; } }
private void FillComTimeAndType() { this.comboTime.Properties.Items.Clear(); this.comboType.Properties.Items.Clear(); this.comboLevel.Properties.Items.Clear(); this.comboTime.Properties.Items.AddRange(new string[] { "30分钟", "60分钟", "90分钟", "120分钟", "150分钟", "180分钟" }); this.comboType.Properties.Items.AddRange(new string[] { "现金", "Visa卡" }); List <CardVo> cardList = SelectDao.SelectData <CardVo>(); foreach (CardVo vo in cardList) { this.comboType.Properties.Items.Add(vo.CardName); } this.comboType.SelectedIndex = 0; List <StaffLevelVo> levelList = SelectDao.SelectData <StaffLevelVo>(); foreach (StaffLevelVo vo in levelList) { this.comboLevel.Properties.Items.Add(vo.StaffLevel); } }
protected override void BtnSave_Click(object sender, EventArgs e) { List <StaffWorkInfoVo> staffOldInfoList = SelectDao.SelectData <StaffWorkInfoVo>(); List <StaffWorkInfoVo> changeList = GenericUtil.GetChanges(staffWorkList, staffOldInfoList); int result = 0; foreach (StaffWorkInfoVo vo in changeList) { //更新 result = UpdateDao.UpdateByID(vo); if (result <= 0) { XtraMessageBox.Show(vo.StaffName + "更新失败!"); continue; } else { XtraMessageBox.Show(vo.StaffName + "更新成功!"); } } EventBus.PublishEvent("StaffWorkStatusChange"); }
protected override void BtnRandomQueue_Click(object sender, EventArgs e) { List <StaffInfoVo> infoList = SelectDao.SelectData <StaffInfoVo>(); List <StaffQueueVo> queueList = new List <StaffQueueVo>(); for (int i = 1; i <= infoList.Count; ++i) { StaffInfoVo infoVo = infoList[i - 1]; StaffQueueVo queueVo = new StaffQueueVo(); queueVo.QueueId = i; queueVo.StaffID = infoVo.StaffId; queueVo.StaffName = infoVo.StaffName; queueVo.StaffSex = infoVo.StaffSex; queueVo.CompanyId = infoVo.CompanyId; queueList.Add(queueVo); } List <StaffQueueVo> newqueueList = RandomSortList(queueList); this.gridControl1.DataSource = newqueueList; this.gridControl1.RefreshDataSource(); SaveStaffQueue(newqueueList); }
protected override void BtnSave_Click(object sender, EventArgs e) { List <DepartmentVo> staffOldInfoList = SelectDao.SelectData <DepartmentVo>(); List <DepartmentVo> changeList = GenericUtil.GetChanges(departmentVoList, staffOldInfoList); int result = 0; if (!CheckParam(changeList)) { return; } foreach (DepartmentVo vo in changeList) { if (SelectDao.IsRepeatedDepartmentId(vo.Id)) { //更新 result = UpdateDao.UpdateByID(vo); if (result <= 0) { XtraMessageBox.Show(vo.Id + "更新失败!"); break; } } else { vo.CompanyId = SystemConst.companyId; result = InsertDao.InsertData(vo); if (result <= 0) { XtraMessageBox.Show(vo.Id + "保存失败!"); break; } } } EventBus.PublishEvent("UpdateDepartment"); XtraMessageBox.Show("保存成功!"); }
private void RefreshClass() { classList = SelectDao.SelectData <StaffClassVo>(); this.gridControl1.DataSource = classList; this.gridControl1.RefreshDataSource(); }
private void RefreshRecharge() { rechargeVoList = SelectDao.SelectData <MemberRechargeVo>(); this.gridControl1.DataSource = rechargeVoList; this.gridControl1.RefreshDataSource(); }
public void 日员工做工报表() { List <StaffWorkRecordVo> recordVoList = SelectDao.SelectData <StaffWorkRecordVo>(); reportControl.SetStaffWorkRecordData(recordVoList); }
public void 会员消费报表() { List <MemberConsumeVo> rechargeVoList = SelectDao.SelectData <MemberConsumeVo>(); reportControl.SetMemberConsumeData(rechargeVoList); }
private void RefreshDepartment() { departmentVoList = SelectDao.SelectData <DepartmentVo>(); this.gridControl1.DataSource = departmentVoList; this.gridControl1.RefreshDataSource(); }