コード例 #1
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            case ListOption.active:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CRole_exten.NotActive(new DAL()));
                }
                else
                {
                    LoadData(CRole_exten.Active(new DAL()));
                }

                break;

            case ListOption.notactive:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CRole_exten.NotActive(new DAL()));
                }
                else
                {
                    LoadData(CRole_exten.Active(new DAL()));
                }

                break;

            case ListOption.Search:
                if (txt_role_name.Text != "")
                {
                    List <Role> list = new List <Role>
                    {
                        CRole_exten.SearchName(txt_role_name.Text, new DAL())
                    };
                    LoadData(list);
                }
                else
                {
                    LoadData(CRole_exten.Active(new DAL()));
                }
                break;

            default:
                LoadData(CRole_exten.Active(new DAL()));
                break;
            }
        }
コード例 #2
0
        public void SetAction(BtnEvent pAction, string pPkValue)
        {
            fAction = pAction;

            switch (fAction)
            {
            case BtnEvent.Open:
                btn_save.Text = "&CLOSE";
                obj           = CRole_exten.PKId(pPkValue, new DAL());
                this.EnableControls(false);
                break;

            case BtnEvent.New:
                btn_save.Text = "&SAVE";
                obj           = CRole.GetNew;
                this.EnableControls(true);
                break;

            case BtnEvent.Edit:
                btn_save.Text = "&UPDATE";
                obj           = CRole_exten.PKId(pPkValue, new DAL());
                this.EnableControls(true);
                break;

            case BtnEvent.Delete:
                btn_save.Text = "CONFIRM\r\n&DELETE";
                obj           = CRole_exten.PKId(pPkValue, new DAL());
                this.EnableControls(false);
                break;

            case BtnEvent.Print:
                btn_save.Text = "&PRINT";
                obj           = CRole_exten.PKId(pPkValue, new DAL());
                this.EnableControls(false);
                break;
            }

            this.LoadData();
        }
コード例 #3
0
ファイル: LRole.cs プロジェクト: CODEXSUN/codexdotnet
 void txt_role_LookupUpdate(object sender, EventArgs e)
 {
     txt_role_name.LookupList = CRole_exten.GetforLookup(new DAL());
 }