Example #1
0
        private void editToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //var aaa = frtGridView.FocusedRowHandle;
            //var bbb = frtGridView.GetFocusedRowCellValue(colFRTID);

            if (!Program.MF.EntryCheck("Firma.frtEditForm", true))
            {
                return;
            }

            int FRTid = 0;

            if (!string.IsNullOrWhiteSpace(frtGridView.GetFocusedRowCellDisplayText(colFRTID)))
            {
                FRTid = (int)frtGridView.GetFocusedRowCellValue(colFRTID);
            }
            frtEditForm frm = new frtEditForm();

            frm.FRTid = FRTid;
            frm.ShowDialog();
            FRTid = frm.FRTid;
            frm.Dispose();

            if (FRTid != 0)
            {
                this.frtTableAdapter.ClearBeforeFill = false;
                this.frtTableAdapter.Fill(this.firmaDataSet.FRT_REC_SEL, string.Format("FRTid = {0}", FRTid), Program.USR);
                this.frtTableAdapter.ClearBeforeFill = true;
            }

            //reQuery();  // ModalForm dan dondugunde frtGridControl_Enter calismiyor
        }
Example #2
0
        private void yeniKayitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int         FRTid = 0;
            frtEditForm frm   = new frtEditForm();

            frm.FRTid = FRTid;
            frm.ShowDialog();
            FRTid = frm.FRTid;
            frm.Dispose();

            if (FRTid != 0)
            {
                this.frtTableAdapter.ClearBeforeFill = false;
                this.frtTableAdapter.Fill(this.firmaDataSet.FRT_REC_SEL, string.Format("FRTid = {0}", FRTid), Program.USR);
                this.frtTableAdapter.ClearBeforeFill = true;
            }
        }