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 InitData() { BLL.PersonBiz biz = new BLL.PersonBiz(); var res = biz.GetUserProfileById(this.UserProfile.Id); BLL.DataCenterBiz dtbiz = new BLL.DataCenterBiz(); if (!res.IsError) { var person = res.DataResponse; ddlPlaceGroup.SelectedValue = person.COMP_CODE; ddlTitle.SelectedValue = person.PRE_NAME_CODE; txtFirstName.Text = person.NAMES; txtLastName.Text = person.LASTNAME; txtIDNumber.Text = person.ID_CARD_NO; txtIDNumber.Enabled = false; rblSex.Text = person.SEX; txtTel.Text = person.TELEPHONE; txtPlaceGroupTel.Text = person.LOCAL_TELEPHONE; txtEmail.Text = person.EMAIL; txtEmail.Enabled = false; txtAddress.Text = person.ADDRESS_1; txtPostcode.Text = person.ZIP_CODE; var message = SysMessage.DefaultSelecting; BLL.DataCenterBiz dataCenter = new BLL.DataCenterBiz(); ddlProvince.SelectedValue = person.PROVINCE_CODE; var lsPC = dataCenter.GetAmpur(message, ddlProvince.SelectedValue); BindToDDL(ddlDistrict, lsPC); ddlDistrict.SelectedValue = person.AREA_CODE; var lsTC = dataCenter.GetTumbon(message, ddlProvince.SelectedValue, ddlDistrict.SelectedValue); BindToDDL(ddlParish, lsTC); ddlParish.SelectedValue = person.TUMBON_CODE; } else { UCModalError.ShowMessageError = res.ErrorMsg; UCModalError.ShowModalError(); } }
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); }