Esempio n. 1
0
        public void GetIDDepFromDialog()
        {
            if (bsShL.Count == 0 || bsShL.Current == null)
            {
                return;
            }
            if (dgvShL.CurrentRow == null || dgvShL.CurrentRow.IsNewRow)
            {
                return;
            }
            var fm  = new Form_Departments();
            var ret = fm.ShowMyDialogModal();

            if (ret != DialogResult.OK)
            {
                return;
            }
            var dr = (dgvShL.CurrentRow.DataBoundItem as DataRowView).Row as KlonsADataSet.SALARY_SHEET_TEMPLRow;

            if (dgvShL.CurrentCell != null)
            {
                try
                {
                    dgvShL.BeginEdit(false);
                    var c = dgvShL.EditingControl as DataGridViewComboBoxEditingControl;
                    c.SelectedValue = fm.SelectedValue;
                    dgvShL.EndEdit();
                }
                catch (Exception) { }
            }
        }
Esempio n. 2
0
        public void GetIDDepFromDialog()
        {
            var fm  = new Form_Departments();
            var ret = fm.ShowMyDialogModal();

            if (ret != DialogResult.OK)
            {
                return;
            }
            cbDep.SelectedValue = fm.SelectedValue;
        }
Esempio n. 3
0
        private string GetDepCode()
        {
            var fm  = new Form_Departments();
            var ret = fm.ShowMyDialogModal();

            if (ret != DialogResult.OK)
            {
                return(null);
            }
            return(fm.SelectedValue);
        }