public void EditPersonal(DTO.MemberType memberType, DTO.PersonTemp personal) { var biz = new BLL.PersonBiz(); String res = ucAttachFileControl1.ValidDocRequire(); if (String.IsNullOrEmpty(res)) { var final = biz.SetPersonTemp(personal, ucAttachFileControl1.AttachFiles.Where(p => p.FILE_STATUS != "A").ConvertToPersonAttatchFiles().ToArray()); if ((final.IsError) || (final.ResultMessage == false)) { UCModalError.ShowMessageError = final.ErrorMsg; UCModalError.ShowModalError(); } else if (final.ResultMessage == true) { UCModalSuccess.ShowMessageSuccess = SysMessage.SaveSucess; UCModalSuccess.ShowModalSuccess(); btnClose.Visible = true; btnCancel.Visible = false; btnOk.Visible = false; //Response.Redirect("~/BankPage.aspx"); } } else { ModelError.ShowMessageError = res; ModelError.ShowModalError(); } }
//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 } }
protected DTO.PersonTemp GetInsuranceFromDataControl() { DTO.PersonTemp insurance = new DTO.PersonTemp(); string strFullAssoName = txtAssociation.Text; string[] strFullAssoNameArray = strFullAssoName.Split('[', ']'); insurance.ID = MasterPage.PersonId; insurance.MEMBER_TYPE = ((int)MemberType).ToString(); //insurance.Association_Name = dc.Name; insurance.COMP_CODE = strFullAssoNameArray[1].ToString(); insurance.ID_CARD_NO = txtIDCard.Text; insurance.PRE_NAME_CODE = ddlTitle.SelectedValue; insurance.NAMES = txtFirstName.Text; insurance.LASTNAME = txtLastName.Text; insurance.SEX = rblSex.SelectedValue; insurance.EMAIL = txtEmail.Text; insurance.LOCAL_TELEPHONE = txtAssociationTel.Text + ((String.IsNullOrWhiteSpace(txtAssociationTelExt.Text)) ? "" : ("#" + txtAssociationTelExt.Text.Trim()));// txtAssociationTel.Text; insurance.TELEPHONE = txtTel.Text + ((String.IsNullOrWhiteSpace(txtTelExt.Text))?"": ("#" + txtTelExt.Text.Trim())); insurance.ADDRESS_1 = UcAddress.Address; insurance.PROVINCE_CODE = UcAddress.ProvinceValue; insurance.AREA_CODE = UcAddress.DistrictValue; insurance.TUMBON_CODE = UcAddress.ParishValue; insurance.ZIP_CODE = UcAddress.TextBoxPostCode.Text; insurance.CREATED_BY = (MasterPage.UserProfile != null)? MasterPage.UserProfile.LoginName:"AGDOI"; //insurance.CREATED_DATE = DateTime.Now; insurance.CREATED_DATE = MasterPage.CreateDateTemp; insurance.UPDATED_BY = (MasterPage.UserProfile != null) ? MasterPage.UserProfile.LoginName : "AGDOI"; insurance.UPDATED_DATE = DateTime.Now; insurance.STATUS = ((int)DTO.PersonDataStatus.WaitForApprove).ToString(); return(insurance); }
//Edit Mode private void GetTempPerson() { DTO.PersonTemp res = MasterPage.GetPersonTemp(); if (res != null) { GetLoadTempDataToControl(res); } }
//Edit Mode private void GetLoadTempDataToControl(DTO.PersonTemp 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; 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 } 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)) //{ // 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; }
private DTO.PersonTemp GetPersonalFromDataControl() { DTO.PersonTemp general = new DTO.PersonTemp(); //var attachFiles = this.AttachFiles; //var personAttachFiles = this.PersonAttachFiles; general.ID = MasterPage.PersonId; general.MEMBER_TYPE = ((int)DTO.MemberType.General).ToString(); general.ID_CARD_NO = txtIDNumber.Text; general.PRE_NAME_CODE = ddlTitle.SelectedValue; general.NAMES = txtFirstName.Text; general.LASTNAME = txtLastName.Text; general.ID_CARD_NO = txtIDNumber.Text; general.BIRTH_DATE = Convert.ToDateTime(txtBirthDay.Text); general.SEX = rblSex.SelectedValue; general.NATIONALITY = ddlNationality.SelectedValue; general.EDUCATION_CODE = ddlEducation.SelectedValue; general.EMAIL = txtEmail.Text; general.LOCAL_TELEPHONE = txtTel.Text + ((String.IsNullOrWhiteSpace(txtTelExt.Text)) ? "" : ("#" + txtTelExt.Text.Trim()));; general.TELEPHONE = txtMobilePhone.Text; general.ADDRESS_1 = ucAddressCurrent.Address; // txtCurrentAddress.Text; general.PROVINCE_CODE = ucAddressCurrent.ProvinceValue; // ddlProvinceCurrentAddress.SelectedValue; general.AREA_CODE = ucAddressCurrent.DistrictValue; // ddlDistrictCurrentAddress.SelectedValue; general.TUMBON_CODE = ucAddressCurrent.ParishValue; // ddlParishCurrentAddress.SelectedValue; general.ZIP_CODE = ucAddressCurrent.PostCode; // txtPostcodeCurrentAddress.Text; general.LOCAL_ADDRESS1 = ucAddressRegister.Address; // txtRegisterAddress.Text; general.LOCAL_PROVINCE_CODE = ucAddressRegister.ProvinceValue; // ddlProvinceRegisterAddress.SelectedValue; general.LOCAL_AREA_CODE = ucAddressRegister.DistrictValue; // ddlDistrictRegisterAddress.SelectedValue; general.LOCAL_TUMBON_CODE = ucAddressRegister.ParishValue; // ddlParishRegisterAddress.SelectedValue; general.LOCAL_ZIPCODE = ucAddressRegister.PostCode; // txtPostcodeRegisterAddress.Text; general.CREATED_BY = (MasterPage.UserProfile != null) ? MasterPage.UserProfile.LoginName : "AGDOI"; //general.CREATED_DATE = DateTime.Now; general.CREATED_DATE = MasterPage.CreateDateTemp; general.UPDATED_BY = (MasterPage.UserProfile != null) ? MasterPage.UserProfile.LoginName : "AGDOI"; general.UPDATED_DATE = DateTime.Now; general.STATUS = ((int)DTO.PersonDataStatus.WaitForApprove).ToString(); general.APPROVED_BY = null; //general.REG_PASS = MasterPage.Password; //if ((ddlAgentType.SelectedValue != "") && (ddlAgentType.SelectedValue != null)) //{ // general.AGENT_TYPE = ddlAgentType.SelectedValue; //} return(general); }
public void EditCompany(DTO.MemberType memberType, DTO.PersonTemp personal) { //var biz = new BLL.PersonBiz(); //DTO.ResponseMessage<bool> res = ucAttachFileControl1.DocRequire(); //if (res.ResultMessage == true) //{ // var final = biz.SetPersonTemp(personal, ucAttachFileControl1.AttachFiles.Where(p => p.FILE_STATUS != "A").ConvertToPersonAttatchFiles().ToArray()); // if (final.IsError) // { // UCModalError.ShowMessageError = final.ErrorMsg; // UCModalError.ShowModalError(); // } //} //else if ((res.ResultMessage == false) || (res.IsError)) //{ // ModelError.ShowMessageError = SysMessage.FileRequire + res.ErrorMsg; // ModelError.ShowModalError(); //} var biz = new BLL.PersonBiz(); String res = ucAttachFileControl1.ValidDocRequire(); if (String.IsNullOrEmpty(res)) { var final = biz.SetPersonTemp(personal, ucAttachFileControl1.AttachFiles.Where(p => p.FILE_STATUS != "A").ConvertToPersonAttatchFiles().ToArray()); if ((final.IsError) || (final.ResultMessage == false)) { UCModalError.ShowMessageError = final.ErrorMsg; UCModalError.ShowModalError(); } else if (final.ResultMessage == true) { UCModalSuccess.ShowMessageSuccess = SysMessage.SaveSucess; UCModalSuccess.ShowModalSuccess(); btnClose.Visible = true; btnCancel.Visible = false; btnOk.Visible = false; } } else { ModelError.ShowMessageError = res; ModelError.ShowModalError(); } }
private DTO.PersonTemp GetInsuranceFromDataControl() { DTO.PersonTemp company = new DTO.PersonTemp(); string strFullCompanyName = txtCompany.Text; string[] strFullCompanyNameArray = strFullCompanyName.Split('[', ']'); DTO.DataItem dc = new BLL.DataCenterBiz().GetCompanyCodeById(strFullCompanyNameArray[1].ToString()); if (dc == null) { MasterPage.ModelError.ShowMessageError = SysMessage.PleaseInputCompCode; MasterPage.ModelError.ShowModalError(); return(null); } company.ID = MasterPage.PersonId; company.MEMBER_TYPE = ((int)DTO.MemberType.Insurance).ToString(); company.COMP_CODE = dc.Id; company.ID_CARD_NO = txtIDCard.Text; company.PRE_NAME_CODE = ddlTitle.SelectedValue; company.NAMES = txtFirstName.Text; company.LASTNAME = txtLastName.Text; company.SEX = rblSex.SelectedValue; company.EMAIL = txtEmail.Text; company.TELEPHONE = txtTel.Text + ((String.IsNullOrWhiteSpace(txtTelExt.Text)) ? "" : ("#" + txtTelExt.Text.Trim())); company.LOCAL_TELEPHONE = txtCompanyTel.Text + ((String.IsNullOrWhiteSpace(txtCompanyTelExt.Text)) ? "" : ("#" + txtCompanyTelExt.Text.Trim())); company.ADDRESS_1 = UcAddress.Address; company.PROVINCE_CODE = UcAddress.ProvinceValue; company.AREA_CODE = UcAddress.DistrictValue; company.TUMBON_CODE = UcAddress.ParishValue; company.ZIP_CODE = UcAddress.TextBoxPostCode.Text; company.CREATED_BY = (MasterPage.UserProfile != null) ? MasterPage.UserProfile.LoginName : "AGDOI"; //company.CREATED_DATE = DateTime.Now; company.CREATED_DATE = MasterPage.CreateDateTemp; company.UPDATED_BY = (MasterPage.UserProfile != null) ? MasterPage.UserProfile.LoginName : "AGDOI"; company.UPDATED_DATE = DateTime.Now; company.STATUS = ((int)DTO.PersonDataStatus.WaitForApprove).ToString(); return(company); }
//Edit Mode protected void GetLoadTempDataToControl(DTO.PersonTemp 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 } }
public DTO.ResponseMessage <bool> EditPerson(DTO.PersonTemp tmpPerson) { return(svc.EditPerson(tmpPerson)); }
public DTO.ResponseMessage <bool> SetPersonTemp(DTO.PersonTemp tmpPerson, DTO.PersonAttatchFile[] tmpFiles) { return(svc.SetPersonTemp(tmpPerson, tmpFiles)); }