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); }
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(); } }
/// <summary> /// Last Update 15/7/2557 /// By Natta /// </summary> 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<string> cc = dbiz.GetAssociateNameById(res.DataResponse.COMP_CODE); //comp = cc.DataResponse.ToString(); //string dd = dbiz.GetAssociateNameById(res.DataResponse.COMP_CODE).ToString(); DTO.ResponseService <DTO.ASSOCIATION> getass = dbiz.GetInsuranceAssociateNameByID(res.DataResponse.COMP_CODE); if (getass.DataResponse != null) { comp = getass.DataResponse.ASSOCIATION_NAME; } } else { comp = dbiz.GetCompanyNameById(res.DataResponse.COMP_CODE); } } if (res.DataResponse != null) { int title = Convert.ToInt32(res.DataResponse.PRE_NAME_CODE); GetTitleAfter(title); if (res.DataResponse.MEMBER_TYPE != null) { //Add new this.MemberTypeSession = res.DataResponse.MEMBER_TYPE; if (res.DataResponse.MEMBER_TYPE == "1") { txtTypeMemberBeforeReg.Text = Resources.propReg_NotApprove_MemberTypeGeneral; lblStartDate8.Text = Resources.propEdit_Reg_Person_002; } else if (res.DataResponse.MEMBER_TYPE == "2") { txtTypeMemberBeforeReg.Text = Resources.propReg_Co_MemberTypeCompany; lblStartDate8.Text = Resources.propregApproveOfficerOIC_001; } else if (res.DataResponse.MEMBER_TYPE == "3") { txtTypeMemberBeforeReg.Text = Resources.propReg_Assoc_MemberTypeAssoc; lblStartDate8.Text = Resources.propregApproveOfficerOIC_001; } } else { txtTypeMemberBeforeReg.Text = Resources.propregApproveOfficerOIC_002; } if (comp != null) { txtCompanyBeforeReg.Text = comp; } else { txtCompanyBeforeReg.Text = Resources.propregApproveOfficerOIC_002; } if (res.DataResponse.NAMES != null) { txtFirstName.Text = res.DataResponse.NAMES; } else { txtFirstName.Text = Resources.propregApproveOfficerOIC_002; } if (res.DataResponse.LASTNAME != null) { txtLastName.Text = res.DataResponse.LASTNAME; } else { txtLastName.Text = Resources.propregApproveOfficerOIC_002; } if (res.DataResponse.SEX != null) { rblSex.SelectedValue = res.DataResponse.SEX; } else { rblSex.SelectedIndex = 0; } if (res.DataResponse.ID_CARD_NO != null) { txtIDCard.Text = res.DataResponse.ID_CARD_NO; } else { txtIDCard.Text = Resources.propregApproveOfficerOIC_002; } if (res.DataResponse.BIRTH_DATE != null) { txtBirthDay.CssClass = "txt"; txtBirthDay.Text = res.DataResponse.BIRTH_DATE.Value.ToString("dd MMMM yyyy"); } else { txtBirthDay.CssClass = "txt"; txtBirthDay.Text = Resources.propregApproveOfficerOIC_002; } if (res.DataResponse.APPROVE_RESULT != null) { txtResultReg.Text = res.DataResponse.APPROVE_RESULT; } else { txtResultReg.Text = ""; } string education = res.DataResponse.EDUCATION_CODE; GetEducationBefore(education); string Nationality = res.DataResponse.NATIONALITY; GetNationalityBefore(Nationality); if (res.DataResponse.EMAIL != null) { txtEmailBeforeReg.Text = res.DataResponse.EMAIL; } else { txtEmailBeforeReg.Text = Resources.propregApproveOfficerOIC_002; } if (res.DataResponse.LOCAL_TELEPHONE != null) { txtTelBeforeReg.Text = res.DataResponse.LOCAL_TELEPHONE; } else { txtTelBeforeReg.Text = Resources.propregApproveOfficerOIC_002; } if (res.DataResponse.TELEPHONE != null) { txtMobilePhoneBeforeReg.Text = res.DataResponse.TELEPHONE; } else { txtMobilePhoneBeforeReg.Text = Resources.propregApproveOfficerOIC_002; } if (res.DataResponse.ADDRESS_1 != null) { txtCurrentAddressBeforeReg.Text = res.DataResponse.ADDRESS_1; } else { txtCurrentAddressBeforeReg.Text = Resources.propregApproveOfficerOIC_002; } 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 = Resources.propregApproveOfficerOIC_002; } 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; txtPostcodeCurrentAddress.Text = res.DataResponse.ZIP_CODE; } else//milk { txtPostcodeCurrentAddress.Text = Resources.propregApproveOfficerOIC_002; } if (res.DataResponse.LOCAL_ZIPCODE != null) { //txtPostcodeCurrentAddress.Enabled = false; txtPostcodeRegisterAddress.Text = res.DataResponse.LOCAL_ZIPCODE; } else//milk { txtPostcodeRegisterAddress.Text = Resources.propregApproveOfficerOIC_002; } // txtResultReg.Text = res.DataResponse.APPROVE_RESULT; //if ((res.DataResponse.AGENT_TYPE != null) && (res.DataResponse.AGENT_TYPE != "")) //{ // ddlAgentType.SelectedValue = res.DataResponse.AGENT_TYPE; //} //else if ((res.DataResponse.AGENT_TYPE == "") || (res.DataResponse.AGENT_TYPE == null)) //{ // ddlAgentType.Items.Clear(); // ddlAgentType.DataSource = null; // ddlAgentType.DataBind(); //} } if (res.IsError) { UCModalError.ShowMessageError = res.ErrorMsg; UCModalError.ShowModalError(); } }