private void GetValueFromControl(HRM_EmpFileAttach f) { f.EmpAttachKey = hfEmpFileKey.Value.ToInt(); f.EmpKey = EmpKey.ToInt(); f.FileName = txtFileName.Text; f.AttachDate = txtDate.Text.ToDateTime(ASL.STATIC.StaticInfo.GridDateFormat); f.AttachDesc = txtDescription.Text; f.FilePath = GetEmpFile(); }
private void GetValueFromControl(HRM_EmpFamily fam) { fam.EmpKey = EmpKey.ToInt(); fam.EmpFamilyKey = hfEmpFamKey.Value.ToInt(); fam.SpouseDOB = txtDateOfBirth.Text == "" ? DateTime.MinValue : txtDateOfBirth.Text.ToDateTime(ASL.STATIC.StaticInfo.GridDateFormat); fam.FatherInLaw = txtFatherInLawsName.Text; fam.Father = txtFathersName.Text; fam.FatherDOB = txtFDateOfBirth.Text == "" ? DateTime.MinValue : txtFDateOfBirth.Text.ToDateTime(ASL.STATIC.StaticInfo.GridDateFormat); fam.MotherDOB = txtMDateOfBirth.Text == "" ? DateTime.MinValue : txtMDateOfBirth.Text.ToDateTime(ASL.STATIC.StaticInfo.GridDateFormat); fam.MotherInLaw = txtMotherInLowsName.Text; fam.Mother = txtMothersName.Text; fam.SpouseName = txtSpouseName.Text; fam.Remark = txtComment.Text; if (ddlFILOccupation.SelectedValue != "") { fam.FatherInLawOccupation = Convert.ToInt32(ddlFILOccupation.SelectedValue); } if (ddlFOccupation.SelectedValue != "") { fam.FatherOccupation = Convert.ToInt32(ddlFOccupation.SelectedValue); } if (ddlMeritalStatus.SelectedValue != "") { fam.MeritalStatus = ddlMeritalStatus.SelectedValue.ToInt(); } if (ddlMILOccupation.SelectedValue != "") { fam.MotherInLawOccupation = Convert.ToInt32(ddlMILOccupation.SelectedValue); } if (ddlMOccupation.SelectedValue != "") { fam.MotherOccupation = Convert.ToInt32(ddlMOccupation.SelectedValue); } if (ddlOccupation.SelectedValue != "") { fam.SpouseOccupation = Convert.ToInt32(ddlOccupation.SelectedValue); } }
internal void GetValueFromControl(HRM_EmpAddr addr) { addr.EmpKey = EmpKey.ToInt(); addr.EmpAddrKey = hfEmpAddrKey.Value.ToInt(); addr.PreCountryKey = ddlCountry.SelectedValue.IfEmptyOrNullThenNull(); addr.PreDistrictKey = ddlDistrict.SelectedValue.IfEmptyOrNullThenNull(); addr.PreCity = ddlCity.SelectedValue.IfEmptyOrNullThenNull(); addr.PreState = ddlState.SelectedValue.IfEmptyOrNullThenNull(); addr.PrePS = txtPS.Text; addr.PrePO = txtPostOfficeLo.Text; addr.BPrePS = txtPSLo.Text; addr.PrePO = txtPostOffice.Text; addr.BPrePO = txtPostalCodeLo.Text; addr.CareOf = txtPreCO.Text; addr.BCareOf = txtPreCOL.Text; addr.PreVillage = txtVillage.Text; addr.BPreVillage = txtVillageLo.Text; addr.PrePostalCode = txtPostalCode.Text; addr.BPrePostalCode = txtPostalCodeLo.Text; addr.PreAdditional = txtAdditional.Text; addr.BPreAdditional = txtAdditionalLo.Text; addr.PerCountryKey = ddlPerCountry.SelectedValue.IfEmptyOrNullThenNull(); addr.PerDistrictKey = ddlPerDistrict.SelectedValue.IfEmptyOrNullThenNull(); addr.PerCity = ddlPerCity.SelectedValue.IfEmptyOrNullThenNull(); addr.PerState = ddlPerState.SelectedValue.IfEmptyOrNullThenNull(); addr.PerPS = txtPerPS.Text; addr.BPerPS = txtPerPSLo.Text; addr.PerPO = txtPerPostOffice.Text; addr.BPerPO = txtPerPostOfficeLO.Text; addr.PerCareOf = txtPerCO.Text; addr.BPerCareOf = txtPerCOLo.Text; addr.PerVillage = txtPerVill.Text; addr.BPerVillage = txtPerVillLo.Text; addr.PerPostalCode = txtPerPC.Text; addr.BPrePostalCode = txtPerPCLo.Text; addr.PerAdditional = txtPerAdditional.Text; addr.BPerAdditional = txtPerAdditionalLo.Text; }