private void FillMvUserData() { // format phone no. CommonCode objCommonCode = new CommonCode(); long physicianId = IoC.Resolve <ISessionContext>().UserSession.CurrentOrganizationRole.OrganizationRoleUserId; ITestRepository testRepository = new TestRepository(); IPhysicianRepository physicianRepository = new PhysicianRepository(); var medicalVendorDal = new MedicalVendorDAL(); bool allowAuthorizations; bool allowEvaluations; //TODO: To Repair medicalVendorDal.GetMVUserFunctionalities(physicianId, out allowAuthorizations, out allowEvaluations); decimal currentPayrate = 0.00M; if (allowEvaluations) { currentPayrate = physicianRepository.GetCurrentPayrate(physicianId); List <Test> tests = testRepository.GetPermittedTestsForaPhysician(physicianId); CurrentPayrateSpan.InnerHtml = string.Format("{0:c}", currentPayrate); PermittedTestsRepeater.DataSource = tests.OrderBy(t => t.Name); PermittedTestsRepeater.DataBind(); } List <EMVMVUser> medicalVendorUserProfile = medicalVendorDal.GetMedicalVendorMedicalVendorUserProfile(IoC.Resolve <ISessionContext>().UserSession.UserId.ToString(), 1); vendorname.InnerText = medicalVendorUserProfile[0].MedicalVendor.BusinessName; name.InnerText = medicalVendorUserProfile[0].MVUser.User.FirstName + " " + medicalVendorUserProfile[0].MVUser.User.MiddleName + " " + medicalVendorUserProfile[0].MVUser.User.LastName; fname.InnerText = medicalVendorUserProfile[0].MVUser.User.FirstName; mname.InnerText = medicalVendorUserProfile[0].MVUser.User.MiddleName; lname.InnerText = medicalVendorUserProfile[0].MVUser.User.LastName; if (medicalVendorUserProfile[0].MVUser.Resume != "") { aDwnResume.HRef = medicalVendorUserProfile[0].MVUser.Resume; aDwnResume.Disabled = false; } else { aDwnResume.Disabled = true; } if (medicalVendorUserProfile[0].MVUser.DigitalSignature != "") { aDwnSign.Disabled = false; aDwnSign.HRef = medicalVendorUserProfile[0].MVUser.DigitalSignature; } else { aDwnSign.Disabled = true; } specialization.InnerText = medicalVendorUserProfile[0].MVUser.MVUserSpecialization.Name; classification.InnerText = medicalVendorUserProfile[0].MVUser.MVUserClassification.Name; DateTime DOB = Convert.ToDateTime(medicalVendorUserProfile[0].MVUser.User.DOB); // DateTime DOA = Convert.ToDateTime(mvmvuser[0]reateDate); address1.InnerText = medicalVendorUserProfile[0].MVUser.User.HomeAddress.Address1; address2.InnerText = medicalVendorUserProfile[0].MVUser.User.HomeAddress.Address2; state.InnerText = medicalVendorUserProfile[0].MVUser.User.HomeAddress.State; country.InnerText = medicalVendorUserProfile[0].MVUser.User.HomeAddress.Country; city.InnerText = medicalVendorUserProfile[0].MVUser.User.HomeAddress.City; zip.InnerText = medicalVendorUserProfile[0].MVUser.User.HomeAddress.ZipID.ToString(); phonehome.InnerText = objCommonCode.FormatPhoneNumberGet(medicalVendorUserProfile[0].MVUser.User.PhoneHome); phonecell.InnerText = objCommonCode.FormatPhoneNumberGet(medicalVendorUserProfile[0].MVUser.User.PhoneCell); phoneother.InnerText = objCommonCode.FormatPhoneNumberGet(medicalVendorUserProfile[0].MVUser.User.PhoneOffice); email1.InnerText = medicalVendorUserProfile[0].MVUser.User.EMail1; email2.InnerText = medicalVendorUserProfile[0].MVUser.User.EMail2; dob.InnerText = DOB.ToString("MMMM dd, yyyy"); ssn.InnerText = medicalVendorUserProfile[0].MVUser.User.SSN; var objCCode = new CommonCode(); imgmyphto.ImageUrl = objCCode.GetPicture(Request.MapPath(medicalVendorUserProfile[0].MVUser.MyPicture), medicalVendorUserProfile[0].MVUser.MyPicture); if (medicalVendorUserProfile[0].MVUser.References.Count <= 0) { refname1.InnerText = ""; refemail1.InnerText = ""; refname2.InnerText = ""; refemail2.InnerText = ""; refname3.InnerText = ""; refemail3.InnerText = ""; } if (medicalVendorUserProfile[0].MVUser.References.Count == 1) { refname1.InnerText = medicalVendorUserProfile[0].MVUser.References[0] == null ? "" : medicalVendorUserProfile[0].MVUser.References[0].Name; refemail1.InnerText = medicalVendorUserProfile[0].MVUser.References[0] == null ? "" : medicalVendorUserProfile[0].MVUser.References[0].EMail; } if (medicalVendorUserProfile[0].MVUser.References.Count == 2) { refname2.InnerText = medicalVendorUserProfile[0].MVUser.References[1] == null ? "" : medicalVendorUserProfile[0].MVUser.References[1].Name; refemail2.InnerText = medicalVendorUserProfile[0].MVUser.References[1] == null ? "" : medicalVendorUserProfile[0].MVUser.References[1].EMail; } if (medicalVendorUserProfile[0].MVUser.References.Count == 3) { refname1.InnerText = medicalVendorUserProfile[0].MVUser.References[0] == null ? "" : medicalVendorUserProfile[0].MVUser.References[0].Name; refemail1.InnerText = medicalVendorUserProfile[0].MVUser.References[0] == null ? "" : medicalVendorUserProfile[0].MVUser.References[0].EMail; refname2.InnerText = medicalVendorUserProfile[0].MVUser.References[1] == null ? "" : medicalVendorUserProfile[0].MVUser.References[1].Name; refemail2.InnerText = medicalVendorUserProfile[0].MVUser.References[1] == null ? "" : medicalVendorUserProfile[0].MVUser.References[1].EMail; refname3.InnerText = medicalVendorUserProfile[0].MVUser.References[2] == null ? "" : medicalVendorUserProfile[0].MVUser.References[2].Name; refemail3.InnerText = medicalVendorUserProfile[0].MVUser.References[2] == null ? "" : medicalVendorUserProfile[0].MVUser.References[2].EMail; } //spdateApplied.InnerText = DOA.ToString("MMMM dd, yyyy"); Ucimagelist1.Images = medicalVendorUserProfile[0].MVUser.OtherPictures.ToList(); }
private void FillMvUserData() { var medicalvendorDal = new MedicalVendorDAL(); List<EMVMVUser> emvmvUsers = medicalvendorDal.GetMedicalVendorMedicalVendorUserProfile(IoC.Resolve<SessionContext>().UserSession.UserId.ToString(), 1); if (emvmvUsers != null) { ViewState["AuditRequired"] = emvmvUsers[0].AuditRequired; ViewState["UserID"] = emvmvUsers[0].MVUser.User.UserID; ViewState["MedicalVendorID"] = emvmvUsers[0].MedicalVendor.MedicalVendorID; ViewState["MVUserID"] = emvmvUsers[0].MVUser.MVUserID; ViewState["strResumeURL"] = emvmvUsers[0].MVUser.Resume; ViewState["CutoffDate"] = emvmvUsers[0].CutOffDate; ViewState["ShowEarningAmount"] = emvmvUsers[0].ShowEarningAmount; if ((ViewState["strResumeURL"] == null) || (Convert.ToString(ViewState["strResumeURL"]) == "")) { spDwnResume.Visible = false; } else { spDwnResume.Visible = true; ClientScript.RegisterStartupScript(typeof(Page), "DwnResume", "<script language='javascript' type='text/javascript' >var aDwnResume=document.getElementById('aDwnResume'); aDwnResume.href='" + emvmvUsers[0].MVUser.Resume + "'; </script>"); } ViewState["strSignatureURL"] = emvmvUsers[0].MVUser.DigitalSignature; if ((ViewState["strSignatureURL"] == null) || (Convert.ToString(ViewState["strSignatureURL"]) == "")) { spDwnSignature.Visible = false; } else { spDwnSignature.Visible = true; ClientScript.RegisterStartupScript(typeof(Page), "DwnSign", "<script language='javascript' type='text/javascript' >var aDwnSign=document.getElementById('aDwnSign'); aDwnSign.href='" + emvmvUsers[0].MVUser.DigitalSignature + "'; </script>"); } ddlVendorName.SelectedValue = emvmvUsers[0].MedicalVendor.MedicalVendorID.ToString(); // txtDateApplied.Text = ""; txtFirstName.Text = emvmvUsers[0].MVUser.User.FirstName; txtLastName.Text = emvmvUsers[0].MVUser.User.LastName; txtMiddleName.Text = emvmvUsers[0].MVUser.User.MiddleName; ddlSpecialization.SelectedValue = emvmvUsers[0].MVUser.MVUserSpecialization.MVUserSpecilaizationID.ToString(); // ddlClassification.SelectedValue = mvmvuser[0].MVUser.MVUserClassification.MVUserClassificationID.ToString(); if (emvmvUsers[0].MVUser.User.DOB == "") txtDOB.Text = ""; else { DateTime DOB = Convert.ToDateTime(emvmvUsers[0].MVUser.User.DOB); txtDOB.Text = DOB.ToString("MM/dd/yyyy"); } txtSSN.Text = emvmvUsers[0].MVUser.User.SSN; ViewState["IsAuthorizationAllowed"] = emvmvUsers[0].IsAuthorizationsAllowed; ////////////////////business infor/////////////////////////////////////// txtAddress1.Text = emvmvUsers[0].MVUser.User.HomeAddress.Address1; txtAddress2.Text = emvmvUsers[0].MVUser.User.HomeAddress.Address2; hfCountryID.Value = emvmvUsers[0].MVUser.User.HomeAddress.CountryID.ToString(); //FillState(); ddlState.SelectedValue = emvmvUsers[0].MVUser.User.HomeAddress.StateID.ToString(); //FillCity(); txtCity.Text = emvmvUsers[0].MVUser.User.HomeAddress.City.ToString(); txtZip.Text = emvmvUsers[0].MVUser.User.HomeAddress.Zip.ToString(); txtPhoneC.Text = emvmvUsers[0].MVUser.User.PhoneCell; txtPhoneH.Text = emvmvUsers[0].MVUser.User.PhoneHome; txtPhoneO.Text = emvmvUsers[0].MVUser.User.PhoneOffice; txtEmail1.Text = emvmvUsers[0].MVUser.User.EMail1; txtEmail2.Text = emvmvUsers[0].MVUser.User.EMail2; ViewState["Resume"] = emvmvUsers[0].MVUser.Resume; ViewState["Signature"] = emvmvUsers[0].MVUser.DigitalSignature; ViewState["ClassificationID"] = emvmvUsers[0].MVUser.MVUserClassification.MVUserClassificationID.ToString(); Ucupdatephotopanel1.Images = emvmvUsers[0].MVUser.OtherPictures.ToList(); Ucupdatephotopanel1.MyImage = emvmvUsers[0].MVUser.MyPicture; DataTable dtpackagetest = new DataTable(); dtpackagetest.Columns.Add("TestID"); dtpackagetest.Columns.Add("Test"); dtpackagetest.Columns.Add("PayRate"); EMVTestPayRate[] userpayrate = emvmvUsers[0].MVUser.MVTestPayRate.ToArray(); if (userpayrate != null) { for (int icount = 0; icount < userpayrate.Length; icount++) { dtpackagetest.Rows.Add(new object[] { userpayrate[icount].Test.TestID, userpayrate[icount].Test.Name, userpayrate[icount].PayRate }); } } ddlVendorName.Enabled = false; } }