예제 #1
0
        private void btn_sale_Click(object sender, EventArgs e)
        {
            //
            Form_SaleResult FormResult = new Form_SaleResult();

            //if (查询数据库比较存在该日期)
            //    则执行以下部分在结果框显示结果
            //    把查询主窗体的日期信息传给查询的显示结果窗体
            FormResult.year  = dtp_sale.Value.Year.ToString();
            FormResult.month = dtp_sale.Value.Month.ToString();
            FormResult.day   = dtp_sale.Value.Day.ToString();
            FormResult.ShowDialog(this);//用formmain唤醒formresult
            //else //否则就在提示显示查询日期不存在
            //MessageBox.Show("The date you type in isn't existed!");
        }
예제 #2
0
파일: Formmain.cs 프로젝트: git-newer/DB
        private void btn_sale_Click(object sender, EventArgs e)
        {
            int             year      = int.Parse(dtp_sale.Value.Year.ToString());
            int             month     = int.Parse(dtp_sale.Value.Month.ToString());
            int             day       = int.Parse(dtp_sale.Value.Day.ToString());
            GoodsInfoStatis GoodsInfo = new GoodsInfoStatis();

            GoodsInfo.SalesSpecifyDate(year, month, day, 1);
            //
            Form_SaleResult FormResult = new Form_SaleResult();

            //if (查询数据库比较存在该日期)
            //    则执行以下部分在结果框显示结果
            //    把查询主窗体的日期信息传给查询的显示结果窗体
            FormResult.year  = dtp_sale.Value.Year.ToString();
            FormResult.month = dtp_sale.Value.Month.ToString();
            FormResult.day   = dtp_sale.Value.Day.ToString();
            FormResult.GoodsInfo.GoodsStatInfo = GoodsInfo.GoodsStatInfo;
            FormResult.ShowDialog(this);//用formmain唤醒formresult


            //else //否则就在提示显示查询日期不存在
            //MessageBox.Show("The date you type in isn't existed!");
        }