示例#1
0
        private void fpView_CellDoubleClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
        {
            if (shtViewHeader.RowCount <= 0)
            {
                return;
            }
            NZString   strMRPNo      = new NZString(null, shtViewHeader.Cells[shtViewHeader.ActiveRowIndex, (int)eHeader.MRPNo].Value);
            NZString   strItemCD     = new NZString(null, shtViewHeader.Cells[shtViewHeader.ActiveRowIndex, (int)eHeader.ItemCD].Value);
            NZString   strLocCD      = new NZString(null, shtViewHeader.Cells[shtViewHeader.ActiveRowIndex, (int)eHeader.OrderLocCD].Value);
            NZInt      iRevision     = new NZInt(null, shtViewHeader.Cells[shtViewHeader.ActiveRowIndex, (int)eHeader.Revision].Value);
            DateTime   dtm           = new DateTime(dtpStartDate.Value.Value.Year, dtpStartDate.Value.Value.Month, 1);
            NZDateTime dtmPeriodFrom = new NZDateTime(null, (dtm));
            MRPBIZ     biz           = new MRPBIZ();
            NZDateTime dtmPeriodTo   = biz.GetMaxMRPDate();

            MRP030_MRPMaintenance MRP030 = new MRP030_MRPMaintenance(strMRPNo, iRevision, strItemCD, strLocCD, dtmPeriodFrom, dtmPeriodTo);

            if (MRP030.ShowDialog(null) == DialogResult.OK)
            {
                //Load New Data
                if (!(string.Empty.Equals(txtMRPNo.Text)))
                {
                    LoadData(txtMRPNo.Text.Trim());
                }
            }
        }
示例#2
0
        public MRP020_MRPList()
        {
            InitializeComponent();
            InitializeScreen();

            //InventoryPeriodBIZ biz = new InventoryPeriodBIZ();
            //InventoryPeriodDTO dto = biz.LoadCurrentPeriodWithQueryRange();
            //dtPeriodBegin.NZValue = dto.PERIOD_BEGIN_DATE;
            //dtPeriodEnd.NZValue = dto.PERIOD_END_DATE;

            DateTime   dtmDate     = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1);
            NZDateTime dtmDateFrom = (NZDateTime)dtmDate;
            MRPBIZ     biz         = new MRPBIZ();
            NZDateTime dtmDateTo   = biz.GetMaxMRPDate();

            dtPeriodBegin.Value = dtmDateFrom;
            dtPeriodEnd.Value   = dtmDateTo;
            LoadData(dtmDateFrom, dtmDateTo);
        }