Exemplo n.º 1
0
        private void ShowEntryForm(FormState Mystate)
        {
            try
            {
                FormHelpers.CursorWait(true);
                var frm = new frmUserGroup();
                switch (Mystate)
                {
                case FormState.Add:
                case FormState.Delete:
                    break;

                case FormState.Edit:
                case FormState.View:
                    var gcode = mgridList.Rows[mgridList.SelectedCells[0].RowIndex].Cells["colUserGroupCode"].Value.ToString();
                    frm.groupid = gcode;
                    break;
                }
                frm.MyState  = Mystate;
                frm.MyCaller = this;
                FormHelpers.ShowForm(frm, (MetroForm)this.MdiParent);
            }
            catch (Exception ex)
            {
                MessageHelpers.ShowError(ex.Message);
            }
            finally
            {
                FormHelpers.CursorWait(false);
            }
        }