Ejemplo n.º 1
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
                case ListOption.active:

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

                    break;

                case ListOption.notactive:

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

                    break;

                case ListOption.Search:
                    if (txt_mtables_id.Text != "")
                    {
                        List<MasterTablePath> list = new List<MasterTablePath>
                     {
                     CMpath_exten.SearchName(txt_mtables_id.Text, new SQLITE_DAL())
                     };
                        LoadData(list);
                    }
                    else
                    {
                        LoadData(CMpath_exten.Active(new SQLITE_DAL()));
                    }
                    break;

                default:
                    LoadData(CMpath_exten.Active(new SQLITE_DAL()));
                    break;
            }
        }
Ejemplo n.º 2
0
        public void SetAction(BtnEvent pAction, string pPkValue)
        {
            fAction = pAction;

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

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

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

            case BtnEvent.Delete:
                btn_save.Text = "CONFIRM\r\nDELETE";
                obj           = CMpath_exten.PKId(pPkValue, new SQLITE_DAL());
                this.EnableControls(false);
                break;

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

            this.LoadData();
        }
Ejemplo n.º 3
0
 void txt_mpath_LookupUpdate(object sender, EventArgs e)
 {
     txt_mtables_id.LookupList = CMpath_exten.GetforLookup(new SQLITE_DAL());
 }