예제 #1
0
        //View Mode
        private void GetLoadDataToControl(DTO.Person general)
        {
            //var attachFiles = this.AttachFiles;
            //var personAttachFiles = this.PersonAttachFiles;
            MasterPage.PersonId = general.ID;
            if (general.MEMBER_TYPE != ((int)DTO.MemberType.General).ToString())
            {
                MasterPage.ModelError.ShowMessageError = SysMessage.UserMissMatchRegitrationData;
                MasterPage.ModelError.ShowModalError();
            }

            txtIDNumber.Text             = general.ID_CARD_NO;
            ddlTitle.SelectedValue       = general.PRE_NAME_CODE;
            txtFirstName.Text            = general.NAMES;
            txtLastName.Text             = general.LASTNAME;
            txtIDNumber.Text             = general.ID_CARD_NO;
            txtBirthDay.Text             = (general.BIRTH_DATE == null) ? "" : ((DateTime)general.BIRTH_DATE).ToString("dd/MM/yyyy");
            rblSex.SelectedValue         = general.SEX;
            rblSex.Enabled               = false;
            ddlNationality.SelectedValue = general.NATIONALITY;
            ddlEducation.SelectedValue   = general.EDUCATION_CODE;
            txtEmail.Text = general.EMAIL;

            txtTel.Text         = LocalTelephoneNumberHelper.GetPhoneNumber(general.LOCAL_TELEPHONE);
            txtTelExt.Text      = LocalTelephoneNumberHelper.GetExtenNumber(general.LOCAL_TELEPHONE);
            txtMobilePhone.Text = general.TELEPHONE;

            ucAddressCurrent.Address = general.ADDRESS_1;       // txtCurrentAddress.Text;
            ucAddressCurrent.SelectDropDownStep(general.PROVINCE_CODE, general.AREA_CODE, general.TUMBON_CODE);
            ucAddressCurrent.PostCode = general.ZIP_CODE;       // txtPostcodeCurrentAddress.Text;

            ucAddressRegister.Address = general.LOCAL_ADDRESS1; // txtRegisterAddress.Text;
            ucAddressRegister.SelectDropDownStep(general.LOCAL_PROVINCE_CODE, general.LOCAL_AREA_CODE, general.LOCAL_TUMBON_CODE);
            ucAddressRegister.PostCode = general.LOCAL_ZIPCODE; // txtPostcodeRegisterAddress.Text;

            if (general.STATUS != null)
            {
                Session["Status"] = general.STATUS.ToString(); //Set status after approve
            }
            if (general.STATUS != Convert.ToString((int)DTO.PersonDataStatus.WaitForApprove))
            {
                MasterPage.ResultRegister = general.APPROVE_RESULT;
            }

            //if ((general.AGENT_TYPE != "") && (general.AGENT_TYPE != null))
            //{
            //    ddlAgentType.SelectedValue = general.AGENT_TYPE;
            //}
            //else if ((general.AGENT_TYPE == "") || (general.AGENT_TYPE == null))
            //{
            //    ddlAgentType.Items.Clear();
            //    ddlAgentType.DataSource = null;
            //    ddlAgentType.DataBind();
            //}
            //general.CREATED_BY = "agdoi";
            //general.CREATED_DATE = DateTime.Now;
            //general.UPDATED_BY = "agdoi";
            //general.UPDATED_DATE = DateTime.Now;
            //general.REG_PASS = MasterPage.Password;
        }
예제 #2
0
        //Edit Mode
        private void GetLoadTempDataToControl(DTO.PersonTemp company)
        {
            MasterPage.PersonId = company.ID;
            if (!company.MEMBER_TYPE.Equals(DTO.MemberType.Insurance.GetEnumValue().ToString()))
            {
                MasterPage.ModelError.ShowMessageError = SysMessage.UserMissMatchRegitrationData;
                MasterPage.ModelError.ShowModalError();
            }

            txtCompanyRegister.Text = company.COMP_CODE;
            ddlTitle.SelectedValue  = company.PRE_NAME_CODE;
            txtFirstName.Text       = company.NAMES;
            txtLastName.Text        = company.LASTNAME;
            txtIDCard.Text          = company.ID_CARD_NO;
            txtIDCard.Enabled       = false;
            rblSex.SelectedValue    = company.SEX;
            txtCompanyTel.Text      = LocalTelephoneNumberHelper.GetPhoneNumber(company.LOCAL_TELEPHONE);
            txtCompanyTelExt.Text   = LocalTelephoneNumberHelper.GetExtenNumber(company.LOCAL_TELEPHONE);
            txtTel.Text             = LocalTelephoneNumberHelper.GetPhoneNumber(company.TELEPHONE);
            txtTelExt.Text          = LocalTelephoneNumberHelper.GetExtenNumber(company.TELEPHONE);

            txtEmail.Text    = company.EMAIL;
            txtEmail.Enabled = false;
            UcAddress.TextBoxAddress.Text = company.ADDRESS_1;
            UcAddress.SelectDropDownStep(company.PROVINCE_CODE, company.AREA_CODE, company.TUMBON_CODE);
            UcAddress.TextBoxPostCode.Text = company.ZIP_CODE;

            txtCompany.Text = new BLL.DataCenterBiz().GetCompanyNameById(company.COMP_CODE);
            UcAddress.DropdownParish.SelectedValue = company.TUMBON_CODE;

            if (company.STATUS != null)
            {
                Session["Status"] = company.STATUS.ToString(); //Set status after approve
            }
        }
예제 #3
0
        private void GetLoadDataToControl(DTO.Registration general)
        {
            //var attachFiles = this.AttachFiles;
            //var personAttachFiles = this.PersonAttachFiles;
            MasterPage.RegistrationId = general.ID;
            if (general.MEMBER_TYPE != ((int)DTO.MemberType.General).ToString())
            {
                MasterPage.ModelError.ShowMessageError = SysMessage.UserMissMatchRegitrationData;
                MasterPage.ModelError.ShowModalError();
            }

            txtIDNumber.Text = general.ID_CARD_NO;
            //ddlTitle.SelectedValue = general.PRE_NAME_CODE;
            ddlTitle.SelectedValue       = (general.PRE_NAME_CODE == null) ? "" : Convert.ToString(Convert.ToInt32(general.PRE_NAME_CODE));
            txtFirstName.Text            = general.NAMES;
            txtLastName.Text             = general.LASTNAME;
            txtIDNumber.Text             = general.ID_CARD_NO;
            txtBirthDay.Text             = (general.BIRTH_DATE == null) ? "" : ((DateTime)general.BIRTH_DATE).ToString("dd/MM/yyyy");
            rblSex.SelectedValue         = general.SEX;
            ddlNationality.SelectedValue = general.NATIONALITY;
            ddlEducation.SelectedValue   = general.EDUCATION_CODE;
            txtEmail.Text  = general.EMAIL;
            txtTel.Text    = LocalTelephoneNumberHelper.GetPhoneNumber(general.LOCAL_TELEPHONE);
            txtTelExt.Text = LocalTelephoneNumberHelper.GetExtenNumber(general.LOCAL_TELEPHONE);

            txtMobilePhone.Text = general.TELEPHONE;

            ucAddressCurrent.Address = general.ADDRESS_1;       // txtCurrentAddress.Text;
            ucAddressCurrent.SelectDropDownStep(general.PROVINCE_CODE, general.AREA_CODE, general.TUMBON_CODE);
            ucAddressCurrent.PostCode = general.ZIP_CODE;       // txtPostcodeCurrentAddress.Text;

            ucAddressRegister.Address = general.LOCAL_ADDRESS1; // txtRegisterAddress.Text;
            ucAddressRegister.SelectDropDownStep(general.LOCAL_PROVINCE_CODE, general.LOCAL_AREA_CODE, general.LOCAL_TUMBON_CODE);
            ucAddressRegister.PostCode = general.LOCAL_ZIPCODE; // txtPostcodeRegisterAddress.Text;


            //if ((general.AGENT_TYPE != "") && (general.AGENT_TYPE != null))
            //{
            //    ddlAgentType.SelectedValue = general.AGENT_TYPE;
            //}
            //else if ((general.AGENT_TYPE == "") || (general.AGENT_TYPE == null))
            //{
            //    ListItem ddlList = new ListItem("กรุณาเลือกประเภทตัวแทนสมาชิก", "", true);
            //    ddlList.Selected = true;
            //    ddlAgentType.Items.Add(ddlList);

            //}

            //general.CREATED_BY = "agdoi";
            //general.CREATED_DATE = DateTime.Now;
            //general.UPDATED_BY = "agdoi";
            //general.UPDATED_DATE = DateTime.Now;
            //general.REG_PASS = MasterPage.Password;
        }
예제 #4
0
        private void GetLoadDataToControl(DTO.Registration asscoent)
        {
            BLL.DataCenterBiz dcbiz      = new BLL.DataCenterBiz();
            BLL.PersonBiz     biz        = new BLL.PersonBiz();
            BLL.DataCenterBiz dataCenter = new BLL.DataCenterBiz();

            var res = biz.GetUserProfileById(this.MasterPage.UserProfile.Id);

            this.MasterPage.AttachFileControl.RegisterationId = this.MasterPage.UserProfile.Id;
            this.MasterPage.AttachFileControl.CurrentUser     = this.UserProfile.LoginName;

            this.MasterPage.RegistrationId = asscoent.ID;

            if (!asscoent.MEMBER_TYPE.Equals(DTO.MemberType.Association.GetEnumValue().ToString()))
            {
                MasterPage.ModelError.ShowMessageError = SysMessage.UserMissMatchRegitrationData;
                MasterPage.ModelError.ShowModalError();
            }

            txtAssociationRegister.Text = asscoent.COMP_CODE;
            ddlTitle.SelectedValue      = asscoent.PRE_NAME_CODE;
            txtFirstName.Text           = asscoent.NAMES;
            txtLastName.Text            = asscoent.LASTNAME;
            txtIDCard.Text            = asscoent.ID_CARD_NO;
            txtIDCard.Enabled         = false;
            rblSex.Text               = asscoent.SEX;
            txtAssociationTel.Text    = LocalTelephoneNumberHelper.GetPhoneNumber(asscoent.LOCAL_TELEPHONE);
            txtAssociationTelExt.Text = LocalTelephoneNumberHelper.GetExtenNumber(asscoent.LOCAL_TELEPHONE);
            txtTel.Text               = LocalTelephoneNumberHelper.GetPhoneNumber(asscoent.TELEPHONE);
            txtTelExt.Text            = LocalTelephoneNumberHelper.GetExtenNumber(asscoent.TELEPHONE);


            txtEmail.Text    = asscoent.EMAIL;
            txtEmail.Enabled = false;
            UcAddress.TextBoxAddress.Text  = asscoent.ADDRESS_1;
            UcAddress.TextBoxPostCode.Text = asscoent.ZIP_CODE;

            //var strName = dcbiz.GetAssociateNameById(asscoent.COMP_CODE);
            DTO.ResponseService <DTO.ASSOCIATION> strName = dcbiz.GetInsuranceAssociateNameByID(asscoent.COMP_CODE);
            if (strName.DataResponse != null)
            {
                txtAssociation.Text = strName.DataResponse.ASSOCIATION_NAME + " " + "[" + asscoent.COMP_CODE + "]";
            }
            else
            {
                txtAssociation.Text = "Name[Null]" + " " + "[" + asscoent.COMP_CODE + "]";
            }

            this.MasterPage.TextBoxResultReg.Text = asscoent.APPROVE_RESULT;

            UcAddress.SelectDropDownStep(asscoent.PROVINCE_CODE, asscoent.AREA_CODE, asscoent.TUMBON_CODE);
        }
예제 #5
0
        private void GetLoadDataToControl(DTO.Registration companyent)
        {
            BLL.DataCenterBiz dcbiz      = new BLL.DataCenterBiz();
            BLL.PersonBiz     biz        = new BLL.PersonBiz();
            BLL.DataCenterBiz dataCenter = new BLL.DataCenterBiz();

            var res = biz.GetUserProfileById(this.MasterPage.UserProfile.Id);

            this.MasterPage.AttachFileControl.RegisterationId = this.MasterPage.UserProfile.Id;
            this.MasterPage.AttachFileControl.CurrentUser     = this.UserProfile.LoginName;

            this.MasterPage.RegistrationId = companyent.ID;

            if (!companyent.MEMBER_TYPE.Equals(DTO.MemberType.Insurance.GetEnumValue().ToString()))
            {
                MasterPage.ModelError.ShowMessageError = SysMessage.UserMissMatchRegitrationData;
                MasterPage.ModelError.ShowModalError();
            }
            rblSex.SelectedValue    = companyent.SEX;//milk
            txtCompanyRegister.Text = companyent.COMP_CODE;
            ddlTitle.SelectedValue  = companyent.PRE_NAME_CODE;
            txtFirstName.Text       = companyent.NAMES;
            txtLastName.Text        = companyent.LASTNAME;
            txtIDNumber.Text        = companyent.ID_CARD_NO;
            txtIDNumber.Enabled     = false;
            txtCompanyTel.Text      = LocalTelephoneNumberHelper.GetPhoneNumber(companyent.LOCAL_TELEPHONE);
            txtCompanyTelExt.Text   = LocalTelephoneNumberHelper.GetExtenNumber(companyent.LOCAL_TELEPHONE);
            txtTel.Text             = LocalTelephoneNumberHelper.GetPhoneNumber(companyent.TELEPHONE);
            txtTelExt.Text          = LocalTelephoneNumberHelper.GetExtenNumber(companyent.TELEPHONE);

            txtEmail.Text    = companyent.EMAIL;
            txtEmail.Enabled = false;
            UcAddress.TextBoxAddress.Text  = companyent.ADDRESS_1;
            UcAddress.TextBoxPostCode.Text = companyent.ZIP_CODE;

            var strName = dcbiz.GetCompanyNameById(companyent.COMP_CODE);

            txtCompany.Text = strName;
            this.MasterPage.TextBoxResultReg.Text = companyent.APPROVE_RESULT;

            UcAddress.SelectDropDownStep(companyent.PROVINCE_CODE, companyent.AREA_CODE, companyent.TUMBON_CODE);
        }
예제 #6
0
        //View Mode
        protected void GetLoadDataToControl(DTO.Person insurance)
        {
            BLL.DataCenterBiz dcbiz = new BLL.DataCenterBiz();

            MasterPage.PersonId = insurance.ID;
            if (!insurance.MEMBER_TYPE.Equals(DTO.MemberType.Association.GetEnumValue().ToString()))
            {
                MasterPage.ModelError.ShowMessageError = SysMessage.UserMissMatchRegitrationData;
                MasterPage.ModelError.ShowModalError();
            }

            txtAssociationRegister.Text = insurance.COMP_CODE;
            ddlTitle.SelectedValue      = insurance.PRE_NAME_CODE;
            txtFirstName.Text           = insurance.NAMES;
            txtLastName.Text            = insurance.LASTNAME;
            txtIDCard.Text            = insurance.ID_CARD_NO;
            txtIDCard.Enabled         = false;
            rblSex.SelectedValue      = insurance.SEX;
            rblSex.Enabled            = false;
            txtAssociationTel.Text    = LocalTelephoneNumberHelper.GetPhoneNumber(insurance.LOCAL_TELEPHONE);
            txtAssociationTelExt.Text = LocalTelephoneNumberHelper.GetExtenNumber(insurance.LOCAL_TELEPHONE);
            txtTel.Text    = LocalTelephoneNumberHelper.GetPhoneNumber(insurance.TELEPHONE);
            txtTelExt.Text = LocalTelephoneNumberHelper.GetExtenNumber(insurance.TELEPHONE);

            txtEmail.Text    = insurance.EMAIL;
            txtEmail.Enabled = false;
            UcAddress.TextBoxAddress.Text = insurance.ADDRESS_1;
            UcAddress.SelectDropDownStep(insurance.PROVINCE_CODE, insurance.AREA_CODE, insurance.TUMBON_CODE);
            UcAddress.TextBoxPostCode.Text = insurance.ZIP_CODE;

            txtAssociation.Text = new BLL.DataCenterBiz().GetInsuranceAssociateNameByID(insurance.COMP_CODE).DataResponse.ASSOCIATION_NAME + " " + "[" + insurance.COMP_CODE + "]";
            UcAddress.DropdownParish.SelectedValue = insurance.TUMBON_CODE;

            if (insurance.STATUS != null)
            {
                Session["Status"] = insurance.STATUS.ToString(); //Set status after approve
            }
            if (insurance.STATUS != Convert.ToString((int)DTO.PersonDataStatus.WaitForApprove))
            {
                MasterPage.ResultRegister = insurance.APPROVE_RESULT;
            }
        }
예제 #7
0
        private void GetRegistrationDetail()
        {
            var    biz      = new BLL.RegistrationBiz();
            var    dbiz     = new BLL.DataCenterBiz();
            string personID = this.PersonID;
            var    res      = biz.GetById(personID);
            var    comp     = string.Empty;

            if (!string.IsNullOrEmpty(res.DataResponse.COMP_CODE))
            {
                if (res.DataResponse.MEMBER_TYPE.Equals(DTO.MemberType.Association.GetEnumValue().ToString()))
                {
                    DTO.ResponseService <DTO.ASSOCIATION> getass = dbiz.GetInsuranceAssociateNameByID(res.DataResponse.COMP_CODE);
                    if (getass.DataResponse != null)
                    {
                        comp = getass.DataResponse.ASSOCIATION_NAME;
                    }
                    //DTO.ResponseService<string> cc = dbiz.GetAssociateNameById(res.DataResponse.COMP_CODE);
                    //comp = cc.DataResponse.ToString();
                    //string dd = dbiz.GetAssociateNameById(res.DataResponse.COMP_CODE).ToString();
                }
                else
                {
                    comp = dbiz.GetCompanyNameById(res.DataResponse.COMP_CODE);
                }
            }
            if (res != null)
            {
                this.PersonalStatus = res.DataResponse.STATUS;
                int title = Convert.ToInt32(res.DataResponse.PRE_NAME_CODE);
                GetTitleAfter(title);
                if (res.DataResponse.MEMBER_TYPE != null)
                {
                    if (res.DataResponse.MEMBER_TYPE == "2")
                    {
                        txtMemberType.Text      = Resources.propReg_Co_MemberTypeCompany;
                        lblTitleType.Text       = Resources.propregApproveCompany_001;
                        lblTitletypePerson.Text = Resources.propregApproveCompany_002;
                        lblCompanyRegister.Text = Resources.propregApproveCompany_003;
                        lblRegister.Text        = "ลงทะเบียน " + Resources.propReg_Co_MemberTypeCompany + " (อนุมัติ)";
                        lblCompany.Text         = Resources.propReg_Co_MemberTypeCompany;
                    }
                    else if (res.DataResponse.MEMBER_TYPE == "3")
                    {
                        txtMemberType.Text      = Resources.propReg_Assoc_MemberTypeAssoc;
                        lblTitleType.Text       = Resources.propregApproveCompany_004;
                        lblTitletypePerson.Text = Resources.propregApproveCompany_005;
                        lblCompanyRegister.Text = Resources.propregApproveCompany_006;
                        lblRegister.Text        = "ลงทะเบียน " + Resources.propReg_Assoc_MemberTypeAssoc + " (อนุมัติ)";
                        lblCompany.Text         = Resources.propReg_Assoc_MemberTypeAssoc;
                    }
                }
                else
                {
                    //txtTypeMemberBeforeReg.Text = "-";
                }
                if (comp != null)
                {
                    txtCompany.Text = comp;
                }
                else
                {
                    txtCompany.Text = "-";
                }

                if (res.DataResponse.COMP_CODE != null)
                {
                    txtCompanyRegister.Text = res.DataResponse.COMP_CODE;
                }
                else
                {
                    txtCompanyRegister.Text = "-";
                }

                if (res.DataResponse.NAMES != null)
                {
                    txtFirstName.Text = res.DataResponse.NAMES;
                }
                else
                {
                    txtFirstName.Text = "-";
                }

                if (res.DataResponse.LASTNAME != null)
                {
                    txtLastName.Text = res.DataResponse.LASTNAME;
                }
                else
                {
                    txtLastName.Text = "-";
                }

                if (res.DataResponse.SEX != null)
                {
                    rblSex.SelectedValue = res.DataResponse.SEX;
                }
                else
                {
                    rblSex.SelectedIndex = 0;
                }

                if (res.DataResponse.ID_CARD_NO != null)
                {
                    txtIDNumber.Text = res.DataResponse.ID_CARD_NO;
                }
                else
                {
                    txtIDNumber.Text = "-";
                }



                if (res.DataResponse.EMAIL != null)
                {
                    txtEmail.Text = res.DataResponse.EMAIL;
                }
                else
                {
                    txtEmail.Text = "-";
                }

                if (res.DataResponse.LOCAL_TELEPHONE != null)
                {
                    txtCompanyTel.Text    = txtCompanyTel.Text = LocalTelephoneNumberHelper.GetPhoneNumber(res.DataResponse.LOCAL_TELEPHONE);
                    txtCompanyTelExt.Text = LocalTelephoneNumberHelper.GetExtenNumber(res.DataResponse.LOCAL_TELEPHONE);
                }
                else
                {
                    txtCompanyTel.Text = "-";
                }

                if (res.DataResponse.TELEPHONE != null)
                {
                    txtTel.Text    = LocalTelephoneNumberHelper.GetPhoneNumber(res.DataResponse.TELEPHONE);
                    txtTelExt.Text = LocalTelephoneNumberHelper.GetExtenNumber(res.DataResponse.TELEPHONE);
                }
                else
                {
                    txtTel.Text = "-";
                }
                if (res.DataResponse.ADDRESS_1 != null)
                {
                    txtAddress.Text = res.DataResponse.ADDRESS_1;
                }
                else
                {
                    txtAddress.Text = "-";
                }

                string province = res.DataResponse.PROVINCE_CODE;
                GetProvinceCurrentAddressBefore(province);

                string ampur = res.DataResponse.AREA_CODE;
                GetAmpurCurrentAddressBefore(province, ampur);

                string tumbon = res.DataResponse.TUMBON_CODE;
                GetTumbonCurrentAddressBefore(province, ampur, tumbon);

                if (res.DataResponse.LOCAL_ADDRESS1 != null)
                {
                    //txtRegisterAddressBeforeReg.Text = res.DataResponse.LOCAL_ADDRESS1;
                }
                else
                {
                    // txtRegisterAddressBeforeReg.Text = "-";
                }


                string localProvince = res.DataResponse.LOCAL_PROVINCE_CODE;
                // GetProvinceRegisterAddressBefore(localProvince);

                string localampur = res.DataResponse.LOCAL_AREA_CODE;
                //GetAmpurRegisterAddressBefore(localProvince, localampur);

                string localtumbon = res.DataResponse.LOCAL_TUMBON_CODE;
                // GetTumbonRegisterAddressBefore(localProvince, localampur, localtumbon);

                //Add new 28/8/2556
                if (res.DataResponse.ZIP_CODE != null)
                {
                    //txtPostcodeRegisterAddress.Enabled = false;
                    txtPost.Text = res.DataResponse.ZIP_CODE;
                }
                else//milk
                {
                    //txtPostcodeCurrentAddress.Text = "-";
                }

                if (res.DataResponse.LOCAL_ZIPCODE != null)
                {
                    //txtPostcodeCurrentAddress.Enabled = false;

                    //txtPostcodeRegisterAddress.Text = res.DataResponse.LOCAL_ZIPCODE;
                }
                else//milk
                {
                    //txtPostcodeRegisterAddress.Text = "-";
                }

                txtResultReg.Text = res.DataResponse.APPROVE_RESULT;
            }

            if (res.IsError)
            {
                //UCModalError.ShowMessageError = res.ErrorMsg;
                //UCModalError.ShowModalError();
            }
        }
예제 #8
0
        /// <summary>
        /// Get&Set Old Persoanl Data from AG_PERSONAL_T by ID_CARD_NO
        /// NT@13/2/2557 & Last Edited
        /// </summary>
        /// <param name="general"></param>
        private void GetPersonalDataToControl(DTO.Person general)
        {
            //ddlAgentType.ClearSelection();
            ddlNationality.ClearSelection();
            ddlEducation.ClearSelection();

            Func <string, string> NationConvert = delegate(string input)
            {
                if ((input != null) && (input != ""))
                {
                    input = "001";
                }
                else
                {
                    input = "";
                }

                return(input);
            };

            txtIDNumber.Text = general.ID_CARD_NO;
            //ddlTitle.SelectedValue = general.PRE_NAME_CODE;
            ddlTitle.SelectedValue       = (general.PRE_NAME_CODE == null) ? "" : Convert.ToString(Convert.ToInt32(general.PRE_NAME_CODE));
            txtFirstName.Text            = general.NAMES;
            txtLastName.Text             = general.LASTNAME;
            txtIDNumber.Text             = general.ID_CARD_NO;
            txtBirthDay.Text             = (general.BIRTH_DATE == null) ? "" : ((DateTime)general.BIRTH_DATE).ToString("dd/MM/yyyy");
            rblSex.SelectedValue         = general.SEX;
            ddlNationality.SelectedValue = NationConvert(general.NATIONALITY);
            ddlEducation.SelectedValue   = general.EDUCATION_CODE;
            txtEmail.Text  = general.EMAIL;
            txtTel.Text    = LocalTelephoneNumberHelper.GetPhoneNumber(general.LOCAL_TELEPHONE);
            txtTelExt.Text = LocalTelephoneNumberHelper.GetExtenNumber(general.LOCAL_TELEPHONE);

            txtMobilePhone.Text = general.TELEPHONE;

            ucAddressCurrent.Address = general.ADDRESS_1; // txtCurrentAddress.Text;

            //AG_PERSONAL_T.AREA_CODE = PROVINCECODE(2)+AMPURCODE(2)+TUMBON(4)
            if ((general.AREA_CODE != null) && (general.AREA_CODE != ""))
            {
                if (general.AREA_CODE.Length > 2)
                {
                    string province = general.AREA_CODE.Substring(0, 2);
                    string district = general.AREA_CODE.Substring(2, 2);
                    string tumbon   = general.AREA_CODE.Substring(4);

                    ucAddressCurrent.SelectDropDownStep(province, district, tumbon);
                }
                else
                {
                    string province = this.MasterPage.NullableString(general.PROVINCE_CODE);
                    string district = this.MasterPage.NullableString(general.AREA_CODE);
                    string tumbon   = this.MasterPage.NullableString(general.TUMBON_CODE);

                    ucAddressCurrent.SelectDropDownStep(province, district, tumbon);
                }
            }

            ucAddressCurrent.PostCode = general.ZIP_CODE;       // txtPostcodeCurrentAddress.Text;

            ucAddressRegister.Address = general.LOCAL_ADDRESS1; // txtRegisterAddress.Text;

            //AG_PERSONAL_T.AREA_CODE = PROVINCECODE(2)+AMPURCODE(2)+TUMBON(4)
            if ((general.LOCAL_AREA_CODE != null) && (general.LOCAL_AREA_CODE != ""))
            {
                if (general.LOCAL_AREA_CODE.Length > 2)
                {
                    string local_province = general.LOCAL_AREA_CODE.Substring(0, 2);
                    string local_district = general.LOCAL_AREA_CODE.Substring(2, 2);
                    string local_tumbon   = general.LOCAL_AREA_CODE.Substring(4);

                    ucAddressRegister.SelectDropDownStep(local_province, local_district, local_tumbon);
                }
                else
                {
                    string local_province = this.MasterPage.NullableString(general.LOCAL_PROVINCE_CODE);
                    string local_district = this.MasterPage.NullableString(general.LOCAL_AREA_CODE);
                    string local_tumbon   = this.MasterPage.NullableString(general.LOCAL_TUMBON_CODE);

                    ucAddressRegister.SelectDropDownStep(local_province, local_district, local_tumbon);
                }
            }

            //ucAddressRegister.SelectDropDownStep(general.LOCAL_PROVINCE_CODE, general.LOCAL_AREA_CODE, general.LOCAL_TUMBON_CODE);
            ucAddressRegister.PostCode = general.LOCAL_ZIPCODE; // txtPostcodeRegisterAddress.Text;


            //if ((general.AGENT_TYPE != "") && (general.AGENT_TYPE != null))
            //{
            //    ddlAgentType.SelectedValue = general.AGENT_TYPE;
            //}
        }