Пример #1
0
        /// <summary>
        /// 显示对应的记录
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Cashier_Tur_Load(object sender, EventArgs e)
        {
            ShopAndPosAndCashier cashier = new ShopAndPosAndCashier();

            for (int i = 0; i < 4; i++)
            {
                DataSet dataset = cashier.Cashier(i);
                try
                {
                    //if(i==0)
                    //cashierTurlabe.Text = "收银员编号为[" + dataset.Tables[0].Rows[0][0].ToString() + "]的营业额是:\n" +Convert .ToDouble ( dataset.Tables[0].Rows[0][1]).ToString ("#.0") + "元";
                    //else if(i==1)
                    //    cashierTurlabeMonth.Text = "此收银员本月营业额是:\n" + Convert.ToDouble(dataset.Tables[0].Rows[0][1]).ToString("#.0") + "元";
                    if (i == 2)
                    {
                        cashierTurlabeWeek.Text = "此收银员本周营业额是:\n" + Convert.ToDouble(dataset.Tables[0].Rows[0][1]).ToString("#.0") + "元";
                    }
                    else
                    {
                        cashierTurlabeDay.Text = "此收银员本日营业额是:\n" + Convert.ToDouble(dataset.Tables[0].Rows[0][1]).ToString("#.0") + "元";
                    }
                }
                catch (Exception)
                {
                    //cashierTurlabe.Text = "收银员编号为[" + Info.emp_id + "]的营业额是:\n0元";
                    //cashierTurlabeMonth.Text = "此收银员本月营业额是:\n0元";
                    //cashierTurlabeWeek.Text = "此收银员本周营业额是:\n0元";
                    //cashierTurlabeDay.Text = "此收银员本日营业额是:\n0元";
                }
            }
        }
Пример #2
0
        /// <summary>
        /// 显示对应的信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void shop_Tur_Load(object sender, EventArgs e)
        {
            ShopAndPosAndCashier shopTur = new ShopAndPosAndCashier();

            for (int i = 0; i < 4; i++)
            {
                DataSet dataset = shopTur.ShopTur(i);
                try
                {
                    //if (i == 0)
                    //    ShopTurlabe.Text = "店号为[" + dataset.Tables[0].Rows[0][0].ToString() + "]的总营业额是:\n" +Convert .ToDouble ( dataset.Tables[0].Rows[0][1]).ToString("#.00") + "元";
                    if (i == 1)
                    {
                        ShopTurlabeMonth.Text = "本店的本月营业额是:\n" + Convert.ToDouble(dataset.Tables[0].Rows[0][1]).ToString("#.0") + "元";
                    }
                    else if (i == 2)
                    {
                        //ShopTurlabeWeek.Text = "本店的本周营业额是:\n" + Convert.ToDouble(dataset.Tables[0].Rows[0][1]).ToString("#.0") + "元";
                    }
                    else
                    {
                        ShopTurlabeDay.Text = "本店的本日营业额是:\n" + Convert.ToDouble(dataset.Tables[0].Rows[0][1]).ToString("#.0") + "元";
                    }
                }
                catch
                {
                    //ShopTurlabe.Text = "店号为[" + Info.shop_id + "]的总营业额是:\n0元";
                    //ShopTurlabeMonth.Text = "本店的本月营业额是:\n0元";
                    //ShopTurlabeWeek.Text = "本店的本周营业额是:\n0元";
                    //ShopTurlabeDay.Text = "本店的本日营业额是:\n0元";
                }
            }
        }
        /// <summary>
        /// 加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Pos_Tur_Load(object sender, EventArgs e)
        {
            ShopAndPosAndCashier postur = new ShopAndPosAndCashier();


            //DataSet dataset = postur.PosTur(3);
            //try
            //{
            //    //if (i == 0)
            //    //    PosTurlabe.Text = "Pos机号为[" + dataset.Tables[0].Rows[0][0].ToString() + "]的营业额是:\n" +Convert .ToDouble ( dataset.Tables[0].Rows[0][1]).ToString("#.0") + "元";
            //    //else if (i == 1)
            //    //    PosTurlabeMonth.Text = "本Pos机本月营业额是:\n" + Convert.ToDouble(dataset.Tables[0].Rows[0][1]).ToString("#.0") + "元";

            //    PosTurlabeDay.Text = "当天营业额是:\n" + Convert.ToDouble(dataset.Tables[0].Rows[0][1]).ToString("#.0") + "元";

            //}
            //catch (Exception)
            //{
            //    //PosTurlabeMonth.Text = "Pos机号为[" + dataset.Tables[0].Rows[0][0].ToString() + "]的营业额是:\n 0元";
            //    //PosTurlabeMonth.Text = "本Pos机本月营业额是:\n0元";
            //    //PosTurlabeWeek.Text = "本Pos机本周营业额是:\n0元";
            //    //PosTurlabeDay.Text = "本Pos机本日营业额是:\n0元";
            //}
            try
            {
                PosTurlabeDay.Text = "当前班次营业额是:\n" + postur.GetSaleMoney().ToString("#.0") + "元";
            }
            catch { }
        }