Ejemplo n.º 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());
                }
            }
        }
Ejemplo n.º 2
0
        private void OnEdit()
        {
            if (!ActivePermission.Edit)
            {
                return;
            }

            NZString   strMRPNo      = new NZString(null, shtView.Cells[shtView.ActiveRowIndex, (int)eColView.MRP_NO].Value);
            NZString   strItemCD     = new NZString(null, shtView.Cells[shtView.ActiveRowIndex, (int)eColView.ITEM_CD].Value);
            NZString   strLocCD      = new NZString(null, shtView.Cells[shtView.ActiveRowIndex, (int)eColView.ORDER_LOC_CD].Value);
            NZInt      iRevision     = new NZInt(null, shtView.Cells[shtView.ActiveRowIndex, (int)eColView.REVISION_NO].Value);
            NZDateTime dtmPeriodFrom = new NZDateTime(null, dtPeriodBegin.Value);
            NZDateTime dtmPeriodTo   = new NZDateTime(null, dtPeriodEnd.Value);

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

            if (MRP020.ShowDialog(null) == DialogResult.OK)
            {
                LoadData(dtPeriodBegin.NZValue, dtPeriodEnd.NZValue);
            }
        }