Пример #1
0
        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("保存成功!");
        }
Пример #2
0
        private void FillPermission()
        {
            List <PermissionVo> voList = SelectDao.SelectData <PermissionVo>();

            this.gridControl1.DataSource = voList;
            this.gridControl1.RefreshDataSource();
        }
Пример #3
0
        private void OrderInfoForm_Load(object sender, EventArgs e)
        {
            GridViewUtil.InitGridView(this.gridView1, typeof(TempOrderVo));
            GridViewUtil.InitGridView(this.gridView2, typeof(SkillVo));

            RefreshSkill();
            FillComboStaff();

            if (_rommVo.RoomStatus.Equals("占用"))
            {
                this.btnOrder.Enabled = false;
                List <TempOrderVo> tempList = SelectDao.GetTempOrderByRoomID <TempOrderVo>(_rommVo.RoomId);
                this.gridControl1.DataSource = tempList;
                this.gridControl1.RefreshDataSource();

                StaffWorkInfoVo workVo = SelectDao.GetWorkStaffInfoByRoomId <StaffWorkInfoVo>(_rommVo.RoomId);


                this.gridView1.BestFitColumns();
                this.panelControl3.Visible   = false;
                this.checkEdit1.Enabled      = false;
                this.checkEdit2.Enabled      = false;
                this.checkEdit3.Enabled      = false;
                this.comboStaff.Enabled      = false;
                this.btnCancelOrder1.Enabled = false;
            }
            else
            {
                this.btnPay.Enabled = false;
            }
        }
Пример #4
0
 public void LoginFreshShow()
 {
     if (SelectDao.UserLogion(this.textName.Text, this.textPsw.Text))
     {
         this.DialogResult = DialogResult.OK;
         UserRight instance = UserRight.GetInstance();
         instance.GetUserRight(this.textName.Text);
         string appPath = System.AppDomain.CurrentDomain.BaseDirectory + "FootConfig.xml";
         XmlUtil.SavaDataInfo(appPath, "User", this.textName.Text);
         //加密
         if (this.checkEdit1.Checked)
         {
             string password = XmlUtil.Encryption(this.textPsw.Text);
             XmlUtil.SavaDataInfo(appPath, "Password", password);
             XmlUtil.SavaDataInfo(appPath, "Remember", "true");
         }
         this.Close();
     }
     else
     {
         progressBarControl1.Position = 0;
         backgroundWorker1.CancelAsync();
         XtraMessageBox.Show("登录失败!");
     }
 }
Пример #5
0
        private void AddPermissionForm_Load(object sender, EventArgs e)
        {
            InitTable();
            if (vo != null)
            {
                this.textName.Text = vo.Name;
                DataTable dt = SelectDao.GetPermissionByName(vo.Name);

                ////比较两个数据源的交集
                //IEnumerable<DataRow> query2 = dt.AsEnumerable().Intersect(dataSrouce.AsEnumerable(), DataRowComparer.Default);
                ////两个数据源的交集集合
                //DataTable dt3 = query2.CopyToDataTable();

                //将已经有的勾选上
                for (int i = 0; i < dataSrouce.Rows.Count; ++i)
                {
                    string modeName = dataSrouce.Rows[i][0].ToString();
                    foreach (DataRow dr in dt.Rows)
                    {
                        string compareName = dr[0].ToString();
                        if (modeName.Equals(compareName))
                        {
                            this.gridView1.SelectRow(i);
                            modeList.Add(compareName);
                        }
                    }
                }
            }
        }
Пример #6
0
        private void BtnAddSever_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(this.textServerName.Text))
            {
                XtraMessageBox.Show("请填写服务名!");
                return;
            }
            if (string.IsNullOrWhiteSpace(this.textSecond.Text))
            {
                XtraMessageBox.Show("请填写服务别名!");
                return;
            }
            if (string.IsNullOrWhiteSpace(this.comboTime.Text))
            {
                XtraMessageBox.Show("请填写服务时长!");
                return;
            }
            if (SelectDao.IsServerNameExist(this.textServerName.Text))
            {
                XtraMessageBox.Show("该服务名已经存在!");
                return;
            }
            SkillVo vo = new SkillVo();

            vo.SkillName  = this.textServerName.Text;
            vo.SecondName = this.textSecond.Text;
            vo.ServerTime = this.comboTime.Text;
            vo.Remark     = this.memoSerRemark.Text;
            vo.CompanyId  = SystemConst.companyId;
            if (InsertDao.InsertData(vo, typeof(SkillVo)) > 0)
            {
                XtraMessageBox.Show("添加项目成功!");
                RefreshSkill();
            }
        }
Пример #7
0
        private void BtnAddPrice_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(this.textPriceA.Text) || string.IsNullOrWhiteSpace(this.textPriceB.Text) || string.IsNullOrWhiteSpace(this.textPriceC.Text))
            {
                XtraMessageBox.Show("价格信息不完整!");
                return;
            }
            if (!FilterUtil.isNumberic(this.textPriceA.Text) || !FilterUtil.isNumberic(this.textPriceB.Text) || !FilterUtil.isNumberic(this.textPriceC.Text))
            {
                XtraMessageBox.Show("价格信息不正确!");
                return;
            }
            SkillPriceVo vo = new SkillPriceVo()
            {
                SkillName = this.textServerNP.Text,
                PriceType = this.comboType.Text,
                PriceA    = Convert.ToDouble(this.textPriceA.Text),
                PriceB    = Convert.ToDouble(this.textPriceB.Text),
                PriceC    = Convert.ToDouble(this.textPriceC.Text),
                Remark    = this.textreamark.Text,
                CompanyId = SystemConst.companyId
            };

            if (SelectDao.IsExistSkillPrice(vo.SkillName, vo.PriceType))
            {
                XtraMessageBox.Show("此价格已经存在!");
                return;
            }
            if (InsertDao.InsertData(vo, typeof(SkillPriceVo)) > 0)
            {
                XtraMessageBox.Show("添加价格成功!");
                RefreshSkillPrice(this.textServerNP.Text);
            }
        }
Пример #8
0
        //刷新服务
        private void RefreshSkill()
        {
            List <SkillVo> voList = SelectDao.SelectData <SkillVo>();

            this.gridControl1.DataSource = voList;
            this.gridControl1.RefreshDataSource();
        }
Пример #9
0
        private void RefreshStaffQueue()
        {
            List <StaffQueueVo> voList = SelectDao.SelectData <StaffQueueVo>();

            this.gridControl1.DataSource = voList;
            this.gridControl1.RefreshDataSource();
        }
Пример #10
0
 private void CheckCashierForm_Load(object sender, EventArgs e)
 {
     tempVoList = SelectDao.SelectData <TempOrderVo>();
     this.gridView1.BestFitColumns();
     this.gridControl1.DataSource = tempVoList;
     this.gridControl1.RefreshDataSource();
 }
Пример #11
0
 private void SetCardInfoGrid()
 {
     GridViewUtil.InitGridView(this.gridView1, typeof(CardVo));
     cardVoList = SelectDao.SelectData <CardVo>();
     this.gridControl1.DataSource = cardVoList;
     this.gridControl1.RefreshDataSource();
 }
Пример #12
0
        private void FillRoom()
        {
            List <RoomVo> voList = SelectDao.SelectData <RoomVo>();

            this.gridControl2.DataSource = voList;
            this.gridControl2.RefreshDataSource();
        }
Пример #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //ユーザー一覧で選択した従業員の情報を最初から表示したい
                EUser EU = new EUser();
                using (TranMng TM = new TranMng())
                {
                    string UserId = Session["UserId"].ToString();
                    user.Text = UserId;
                    //選んだユーザーの情報をエンティティに保存
                    SelectDao SD = new SelectDao();
                    EU                 = SD.Select(UserId);
                    last_nm.Text       = EU.last_nm;
                    first_nm.Text      = EU.first_nm;
                    last_nm_kana.Text  = EU.last_nm_kana;
                    first_nm_kana.Text = EU.first_nm_kana;
                }

                DropDownList1.SelectedIndex = EU.gender_cd;

                ListItem li2         = DropDownList2.Items.FindByValue(EU.section_cd);
                int      section_idx = DropDownList2.Items.IndexOf(li2);
                DropDownList2.SelectedIndex = section_idx;
            }
        }
Пример #14
0
        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);
        }
Пример #15
0
        private void FillUser()
        {
            List <UserRoleVo> voList = SelectDao.SelectData <UserRoleVo>();

            this.gridControl2.DataSource = voList;
            this.gridControl2.RefreshDataSource();
        }
Пример #16
0
        //private void RefreshSever()
        //{
        //    List<ServerVo> voList = new List<ServerVo>();
        //    SelectDao.SelectData(ref voList);
        //    this.gridControl2.DataSource = voList;
        //    this.gridControl2.RefreshDataSource();
        //}
        private void RefreshSkillPrice(string serverName)
        {
            List <SkillPriceVo> voList = new List <SkillPriceVo>();

            SelectDao.GetSkillPriceByName(serverName, ref voList);
            this.gridControl3.DataSource = voList;
            this.gridControl3.RefreshDataSource();
        }
Пример #17
0
        private void RefreshSkill()
        {
            List <SkillVo> voList = SelectDao.SelectData <SkillVo>();

            this.gridControl2.DataSource = voList;
            this.gridView2.BestFitColumns();
            this.gridControl2.RefreshDataSource();
        }
Пример #18
0
        private void RefreshSkillCommision(string serverName)
        {
            List <SkillCommisionVo> voList = new List <SkillCommisionVo>();

            SelectDao.GetSkillCommisionByName(serverName, ref voList);
            this.gridControl4.DataSource = voList;
            this.gridControl4.RefreshDataSource();
        }
Пример #19
0
        private void RefeshStaffInfoByGender(string sex)
        {
            DataTable dt = SelectDao.SelectStaffByGender(sex);

            this.gridControl1.DataSource = dt;
            this.gridControl1.RefreshDataSource();
            this.gridView1.BestFitColumns();
        }
Пример #20
0
        public void RefeshStaffInfo()
        {
            DataTable dt = SelectDao.SelectData(typeof(StaffWorkInfoVo));

            this.gridControl1.DataSource = dt;
            this.gridControl1.RefreshDataSource();
            this.gridView1.BestFitColumns();
        }
Пример #21
0
 public ConsumeInfoUI()
 {
     InitializeComponent();
     GridViewUtil.InitGridView(this.gridView1, typeof(MemberConsumeVo));
     consumeVoList = SelectDao.SelectData <MemberConsumeVo>();
     this.gridControl1.DataSource = consumeVoList;
     this.gridControl1.RefreshDataSource();
 }
Пример #22
0
        private void FillMemberRecharge()
        {
            DataTable dt = SelectDao.GetMemberRechargeByName(this.textName.Text);

            this.gridControl1.DataSource = dt;
            this.gridControl1.RefreshDataSource();
            this.gridView1.BestFitColumns();
        }
Пример #23
0
        private void FillMemberLevel()
        {
            List <CardVo> cardDaoList = SelectDao.SelectData <CardVo>();

            foreach (CardVo vo in cardDaoList)
            {
                this.comCardLevel.Properties.Items.Add(vo.CardName);
            }
        }
Пример #24
0
        private void RefreshMember()
        {
            memberVoList.Clear();
            memberVoList = SelectDao.SelectData <MemberInfoVo>();
            this.gridControl1.DataSource = memberVoList;
            this.gridControl1.RefreshDataSource();

            this.gridView1.BestFitColumns();
        }
Пример #25
0
 private bool CheckRoomId()
 {
     if (FilterUtil.isNumberic(this.textRoomId.Text))
     {
         int roomId = Convert.ToInt32(this.textRoomId.Text);
         return(SelectDao.CheckRoomExist(roomId));
     }
     return(false);
 }
Пример #26
0
        private void FillComMode()
        {
            List <PermissionVo> voList = new List <PermissionVo>();
            DataTable           dt     = SelectDao.GetPermission();

            foreach (DataRow dr in dt.Rows)
            {
                comMode.Properties.Items.Add(dr[0].ToString());
            }
        }
Пример #27
0
 public StaffWorkQueryUI()
 {
     EventBus.RegisterEvent(this);
     InitializeComponent();
     InitEvents();
     GridViewUtil.InitGridView(this.gridView1, typeof(StaffWorkRecordVo));
     staffRecordList = SelectDao.SelectData <StaffWorkRecordVo>();
     this.gridControl1.DataSource = staffRecordList;
     this.gridControl1.RefreshDataSource();
 }
Пример #28
0
        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;
        }
Пример #29
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;
        }
Пример #30
0
        private void GridView2_MouseUp(object sender, MouseEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(comboStaff.Text))
            {
                XtraMessageBox.Show("请选择技师");
                return;
            }
            if (e.Button == MouseButtons.Left)
            {
                SkillVo  vo     = (SkillVo)this.gridView2.GetRow(this.gridView2.FocusedRowHandle);
                double[] prices = SelectDao.GetSkillPrice(vo.SkillName, "现金");

                string staffName = comboStaff.Text;
                string staffId   = SelectDao.SelectSatffIDByName(staffName);
                //创建ID
                //orderId = GenrateIDUtil.GenerateOrderID();

                DateTime tempTime = new DateTime();
                if (_tempOrderList.Count > 0)
                {
                    tempTime = _tempOrderList[_tempOrderList.Count - 1].EndTime;
                }
                else
                {
                    tempTime = DateTime.Now;
                }
                TempOrderVo tempVo = new TempOrderVo()
                {
                    Id     = 0,
                    RoomID = _rommVo.RoomId,
                    //OrderID = orderId,
                    SkillId   = vo.SkillId,
                    SkillName = vo.SkillName,
                    StaffID   = staffId,
                    StaffName = staffName,
                    WorkType  = _itype,
                    StartTime = tempTime,
                    EndTime   = SelectDao.GetTempOrderEndTime(vo.SkillId, tempTime),
                    PriceA    = prices[0],
                    PriceB    = prices[1],
                    PriceC    = prices[2],
                    CompanyId = SystemConst.companyId
                };
                _tempOrderList.Add(tempVo);
                this.gridControl1.DataSource = _tempOrderList;
                this.gridControl1.RefreshDataSource();
                this.gridView1.BestFitColumns();

                GetPriceByType(prices);
                this.labelPrice.Text = _price.ToString("f8");
            }
        }