Ejemplo n.º 1
0
        private void OnEdit()
        {
            if (!ActivePermission.Edit)
            {
                return;
            }
            if (shtView.RowCount <= 0)
            {
                return;
            }
            NZString transID      = new NZString(null, shtView.GetValue(shtView.ActiveRowIndex, (int)eColView.TRANS_ID));
            NZString GroupTransID = new NZString(null, shtView.GetValue(shtView.ActiveRowIndex, (int)eColView.GROUP_TRANS_ID));

            //ถ้าไม่มี group ก็แสดงหน้าเดี่ยว
            //ถ้ามี group ก็แสดงหน้า group
            if (GroupTransID.IsNull)
            {
                TRN080 dialog = new TRN080(transID);
                if (dialog.ShowDialog(this) == DialogResult.OK)
                {
                    LoadData(dtPeriodBegin.NZValue, dtPeriodEnd.NZValue);
                }
            }
            else
            {
                TRN160_MultiWorkResultEntry dialog = new TRN160_MultiWorkResultEntry(transID);
                if (dialog.ShowDialog(this) == DialogResult.OK)
                {
                    LoadData(dtPeriodBegin.NZValue, dtPeriodEnd.NZValue);
                }
            }
        }
Ejemplo n.º 2
0
        private void tsbNewMultiWorkResult_Click(object sender, EventArgs e)
        {
            TRN160_MultiWorkResultEntry dialog = new TRN160_MultiWorkResultEntry();

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