Exemplo n.º 1
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            SysRoleMasterSearch win = new SysRoleMasterSearch();
            win.ShowDialog();

            List<Sys_RoleMaster_rlm_Info> items = win._RtvInfo;
            if (items != null)
            {
                try
                {

                    List<Sys_RoleMaster_rlm_Info> cumList = new List<Sys_RoleMaster_rlm_Info>();

                    foreach (Sys_RoleMaster_rlm_Info usm in items)
                    {
                        ListViewItem list = new ListViewItem();
                        list.Text = usm.rlm_cRoleID.ToString();
                        if (!IsExistsItem(list.Text))
                        {
                            //cumList.Add(cum);

                            ListViewItem it = new ListViewItem(usm.rlm_cRoleID.ToString());
                            it.SubItems.Add(usm.rlm_cRoleDesc.ToString());
                            lvwMaster.Items.Add(it);
                        }
                    }
                }
                catch (Exception Ex)
                { ShowErrorMessage(Ex); }
            }

            win.Dispose();
            win = null;
        }
Exemplo n.º 2
0
        private void ToolBar_BtnSearchClick(object sender, EventArgs e)
        {
            SysRoleMasterSearch win = new SysRoleMasterSearch();
            win.ShowDialog();

            if (win.DialogResult == DialogResult.OK)
            {
                //iRecordID = win.displayRecordID;
                iRecordID = win._RtvInfo[0].rlm_iRecordID.ToString();
                Sys_RoleMaster_rlm_Info info = new Sys_RoleMaster_rlm_Info();
                try
                {
                    info.rlm_iRecordID = Convert.ToInt32(iRecordID);
                    Model.IModel.IModelObject result = _sysRoleMasterBL.DisplayRecord(info);
                    info = result as Sys_RoleMaster_rlm_Info;
                }
                catch (Exception Ex)
                {
                    ShowErrorMessage(Ex);
                }
                this.EditState = DefineConstantValue.EditStateEnum.OE_ReaOnly;
                SetTxtBox(DefineConstantValue.EditStateEnum.OE_ReaOnly);
                SetOpenToolBar();
                ShowInfo(info);
            }

            win.Dispose();
            win = null;
        }