예제 #1
0
        private Stables CollectData()
        {
            Stables fobj = new Stables()
            {
                Stables_id    = vId,
                Databases_id  = CDatabases_exten.GetId_Name(txt_databases_id.Text.Trim()),
                Stables_name  = txt_tables_name.Text.ToUpper().Trim(),
                Alias         = txt_tables_alias.Text.ToUpper().Trim(),
                Namespaces_id = CNamespaces_exten.GetId_Name(txt_namespaces_id.Text.Trim()),
                Active_id     = Core.Stative,
            };

            return(fobj);
        }
예제 #2
0
        public void List_Option(ListOption pAction)
        {
            fAction = pAction;

            switch (fAction)
            {
            case ListOption.active:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CDatabases.TblData(CDatabases_exten.NotActive()));
                }
                else
                {
                    LoadData(CDatabases.TblData(CDatabases_exten.Active()));
                }

                break;

            case ListOption.notactive:

                if (chk_notactive.Checked == true)
                {
                    LoadData(CDatabases.TblData(CDatabases_exten.NotActive()));
                }
                else
                {
                    LoadData(CDatabases.TblData(CDatabases_exten.Active()));
                }

                break;

            case ListOption.Search:
                if (txt_databases_name.Text != "")
                {
                    LoadData(CDatabases.TblData(CDatabases_exten.SearchName(txt_databases_name.Text)));
                }
                else
                {
                    LoadData(CDatabases.TblData(CDatabases_exten.Active()));
                }
                break;

            default:
                LoadData(CDatabases.TblData(CDatabases_exten.Active()));
                break;
            }
        }
예제 #3
0
        public void SetAction(BtnEvent pAction, string pPkValue)
        {
            fAction = pAction;

            switch (fAction)
            {
            case BtnEvent.Open:
                btn_save.Text = "CLOSE";
                obj           = CDatabases.PropertiesData(CDatabases_exten.PKId(pPkValue));
                this.EnableControls(false);
                break;

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

            case BtnEvent.Edit:
                btn_save.Text = "UPDATE";
                obj           = CDatabases.PropertiesData(CDatabases_exten.PKId(pPkValue));
                this.EnableControls(true);
                break;

            case BtnEvent.Delete:
                btn_save.Text = "CONFIRM\r\nDELETE";
                obj           = CDatabases.PropertiesData(CDatabases_exten.PKId(pPkValue));
                this.EnableControls(false);
                break;

            case BtnEvent.Print:
                btn_save.Text = "PRINT";
                obj           = CDatabases.PropertiesData(CDatabases_exten.PKId(pPkValue));
                this.EnableControls(false);
                break;
            }

            this.LoadData();
        }
예제 #4
0
 void Txt_databases_LookupUpdate(object sender, EventArgs e)
 {
     txt_databases_id.LookupList = CDatabases_exten.GetforLookup();
 }