示例#1
0
        private void IstabAddEditForm_Load(object sender, EventArgs e)
        {
            if (this.mode == FORM_MODE.ADD)
            {
                this.Text = "Add data : " + Istab.getTabtypTitle(this.tabtyp);
                this.txtTypcod.Focus();
            }
            else
            {
                this.Text = "Edit data : " + Istab.getTabtypTitle(this.tabtyp);
                this.txtTypcod.Enabled = false;
                this.txtAbbreviate_th.Focus();

                CRUDResult   get = ApiActions.GET(PreferenceForm.API_MAIN_URL() + "istab/get_by_id&id=" + this.istab.id);
                ServerResult sr  = JsonConvert.DeserializeObject <ServerResult>(get.data);
                if (sr.result == ServerResult.SERVER_RESULT_SUCCESS)
                {
                    if (sr.istab != null)
                    {
                        this.istab                 = sr.istab.First <Istab>();
                        this.txtTypcod.Text        = this.istab.typcod;
                        this.txtAbbreviate_en.Text = this.istab.abbreviate_en;
                        this.txtAbbreviate_th.Text = this.istab.abbreviate_th;
                        this.txtTypdes_en.Text     = this.istab.typdes_en;
                        this.txtTypdes_th.Text     = this.istab.typdes_th;
                    }
                }
            }
        }
示例#2
0
 private void setTitleText()
 {
     this.Text = Istab.getTabtypTitle(this.tabtyp);
 }
示例#3
0
 private void IstabWindow_Load(object sender, EventArgs e)
 {
     this.Text = Istab.getTabtypTitle(this.tabtyp);
     this.GetIstabData();
     this.BindControlEventHandler();
 }