示例#1
0
        //private void OnNew()
        //{
        //    TRN020 dialog = new TRN020();
        //    if (dialog.ShowDialog(this) == DialogResult.OK)
        //    {
        //        LoadData(dtPeriodBegin.NZValue, dtPeriodEnd.NZValue);
        //    }
        //}

        private void OnEdit()
        {
            if (!ActivePermission.Edit)
            {
                return;
            }
            if (shtCustomerOrderList.RowCount <= 0)
            {
                return;
            }
            NZString OrderNo = new NZString(null, shtCustomerOrderList.GetValue(shtCustomerOrderList.ActiveRowIndex, (int)eColView.ORDER_NO));
            TRN190_CustomerOrderEntry dialog = new TRN190_CustomerOrderEntry(OrderNo);

            if (dialog.ShowDialog(this) == DialogResult.OK)
            {
                NZInt  dateType   = null;
                int    iDateValue = 0;
                object oDateValue = cboFilterDate.SelectedValue;

                if (oDateValue != null && Int32.TryParse(oDateValue.ToString(), out iDateValue))
                {
                    dateType = new NZInt(null, iDateValue);
                }
                else
                {
                    dateType = new NZInt(null, 1);
                }

                LoadData(dtPeriodBegin.NZValue, dtPeriodEnd.NZValue, dateType);
            }
        }
示例#2
0
        public override void OnAddNew()
        {
            base.OnAddNew();
            TRN190_CustomerOrderEntry dialog = new TRN190_CustomerOrderEntry();

            if (dialog.ShowDialog(this) == DialogResult.OK)
            {
                NZInt  dateType   = null;
                int    iDateValue = 0;
                object oDateValue = cboFilterDate.SelectedValue;

                if (oDateValue != null && Int32.TryParse(oDateValue.ToString(), out iDateValue))
                {
                    dateType = new NZInt(null, iDateValue);
                }
                else
                {
                    dateType = new NZInt(null, 1);
                }

                LoadData(dtPeriodBegin.NZValue, dtPeriodEnd.NZValue, dateType);
            }
        }