Esempio n. 1
0
        public InspectListReportForm()
        {
            InitializeComponent();

            DateTime today = DateTime.Today;

            dtpFrom.Value = new DateTime(today.Year, today.Month, 1);
            dtpTo.Value = new DateTime(today.Year, today.Month, DateTime.DaysInMonth(today.Year, today.Month));

            DataTable lineTable = DatabaseSet.產線Table.Copy();
            lineTable.Columns.Add("Display", typeof(string));
            foreach (DataRow row in lineTable.Rows)
                row["Display"] = row["產線"];

            DataRow allRow = lineTable.NewRow();
            allRow["產線"] = string.Empty;
            allRow["Display"] = "全部";
            lineTable.Rows.Add(allRow);

            lineTable.DefaultView.Sort = "產線";
            cbxLine.DataSource = lineTable;
            cbxLine.DisplayMember = "Display";
            cbxLine.ValueMember = "產線";

            _sortForm = new InspectListReportSortForm();
            _sortForm.Columns = new SortColumn[] {
                new SortColumn("產線"),
                new SortColumn("QCN", "QC#"),
                new SortColumn("品號", "料號"),
                new SortColumn("工作單號"),
                new SortColumn("檢驗日期")
            };
        }
Esempio n. 2
0
        public InspectListReportForm()
        {
            InitializeComponent();

            DateTime today = DateTime.Today;

            dtpFrom.Value = new DateTime(today.Year, today.Month, 1);
            dtpTo.Value   = new DateTime(today.Year, today.Month, DateTime.DaysInMonth(today.Year, today.Month));

            DataTable lineTable = DatabaseSet.產線Table.Copy();

            lineTable.Columns.Add("Display", typeof(string));
            foreach (DataRow row in lineTable.Rows)
            {
                row["Display"] = row["產線"];
            }

            DataRow allRow = lineTable.NewRow();

            allRow["產線"]      = string.Empty;
            allRow["Display"] = "全部";
            lineTable.Rows.Add(allRow);

            lineTable.DefaultView.Sort = "產線";
            cbxLine.DataSource         = lineTable;
            cbxLine.DisplayMember      = "Display";
            cbxLine.ValueMember        = "產線";

            _sortForm         = new InspectListReportSortForm();
            _sortForm.Columns = new SortColumn[] {
                new SortColumn("產線"),
                new SortColumn("QCN", "QC#"),
                new SortColumn("品號", "料號"),
                new SortColumn("工作單號"),
                new SortColumn("檢驗日期")
            };
        }