コード例 #1
0
        private void AddWarehouseInformation_Load(object sender, EventArgs e)
        {
            WarehouseInformationController.SetProvinceBox(comboProvince);   //set province data into combobox
            WarehouseInformationController.SetcomboCuscode(comboMemberCode);
            WarehouseInformationController.SetcomboIndustrial(comboIndustrial);
            WarehouseInformationController.SetcomboUsage(comboUsage);

            if (model != null) //check model has data?
            {
                /* set Model into data */
                //comboMemberCode.SelectedValue = model.Province; //set selected value province.
                comboMemberCode.SelectedValue = model.memberCode;                      //set selected value province.
                comboProvince.SelectedValue   = model.provinceCode;                    //set selected value province.
                comboIndustrial.SelectedValue = model.industrialCode;                  //set selected value province.
                comboUsage.SelectedValue      = model.usageType;                       //set selected value province.
                txtManageNo.Text    = model.manageno;
                txtLocationLat.Text = model.lat;                                       //set LocationLat.
                txtLocationLng.Text = model.lng;                                       //set LocationLng.

                checkGeneral.Checked       = (model.catGl.Equals("1"))? true : false;  //set Check General.
                checkBonded.Checked        = (model.catBon.Equals("1"))? true : false; //set Bonded
                checkEXPLOSIVES.Checked    = (model.catExp.Equals("1")) ? true : false;
                checkFreeze.Checked        = (model.catFrz.Equals("1")) ? true : false;
                checkPefrigeration.Checked = (model.catRefri.Equals("1")) ? true : false;
                checkHeaveis.Checked       = (model.catHeav.Equals("1")) ? true : false;
                checkOther.Checked         = (model.catX.Equals("1")) ? true : false;

                txtWarehousenameEng.Text  = model.nameEn;
                txtWarehousenameThai.Text = model.nameTh;
                txtWarehousenameJPN.Text  = model.nameJp;
                txtWarehouseAdd.Text      = model.addr;
                txtPhone.Text             = model.tel;
                txtContractEng.Text       = model.contactEn;
                txtContractThai.Text      = model.contactTh;
                txtContractJPN.Text       = model.contactJp;
                txtDecriptionEnglish.Text = model.desEn;
                txtDecriptionThai.Text    = model.desTh;
                txtDecriptionJPN.Text     = model.desTh;
                dtpRegister.Text          = model.regDate;
                dtpActivedate.Text        = model.activeDate;
                dtpInActiveDate.Text      = model.InActiveDate;
            }
        }