Beispiel #1
0
        void windowsUIButtonPanel_ButtonClick(object sender, DevExpress.XtraBars.Docking2010.ButtonEventArgs e)
        {
            if (e.Button.Properties.Caption == "Print")
            {
                gridControl.ShowRibbonPrintPreview();
            }
            switch (e.Button.Properties.Caption)
            {
            case "查询":
                if (dateEdit_Start.EditValue == null ||
                    dateEdit_End.EditValue == null)
                {
                    this.gridControl.DataSource = _productionPlanDao.GetDataSource();
                    break;
                }
                string startTime = Convert.ToDateTime(dateEdit_Start.EditValue).ToString("yyyy-MM-dd HH:mm:ss");
                string endTime   = Convert.ToDateTime(dateEdit_End.EditValue).ToString("yyyy-MM-dd HH:mm:ss");
                this.gridControl.DataSource = _productionPlanDao.FindByDateTime(startTime, endTime);
                break;

            case "导出":
                Common.ExportToXlsx(gridControl, this);
                break;

            case "清空":
                this.gridControl.DataSource = new BindingList <Models.ProductionPlan>();
                break;
            }
        }
Beispiel #2
0
        public AddForm2()
        {
            InitializeComponent();
            m_productionPlanDao = new ProductionPlanDao();

            gridControl.DataSource = m_productionPlanDao.GetDataSource();
        }
Beispiel #3
0
        public AddForm3(ProductionPlanControl parent)
        {
            InitializeComponent();
            m_parent                   = parent;
            m_productionPlanDao        = new ProductionPlanDao();
            this.txt_BatchNo.EditValue = DateTime.Now.ToString("yyyyMMdd");

            gridControl.DataSource = m_productionPlanDao.GetDataSource();
        }