public List <DTO_Scope> GetScopes(DTO_Claim claim) { // if (s1.ScopesList.Count == 1) //{ // if (s1.ScopesList[0].Message != string.Empty) // claimscopelist.Clear(); // DTO_Scope scope = new DTO_Scope(); //// scope.ScopeTypeID = 1; // claimscopelist.Add(scope); // } ImageBrush ib = new ImageBrush(); ib.ImageSource = new BitmapImage(new Uri(@"../../ResourceFiles/XMark.png", UriKind.Relative)); MRNEstimateStatusImage.Background = ib; OldScopeStatusImage.Background = ib; NewScopeStatusImage.Background = ib; claimscopelist.Clear(); foreach (DTO_Scope c in s1.ScopesList) { if (c.ClaimID == claim.ClaimID) { claimscopelist.Add(c); SetScopeByScopeID(c); } } return(claimscopelist); }
private void radioButton_Checked(object sender, RoutedEventArgs e) { claim = (DTO_Claim)claimIDComboBox.SelectedValue; ClaimScopeListProcessingForDisplay(GetScopes(claim), 1); totalTextBox.IsEnabled = true; DisplayScopeInfo(GetScopes(claim), 1, claim); }
private void claimIDComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (bab == false) { // DTO_Claim claim = new DTO_Claim(); claim = (DTO_Claim)claimIDComboBox.SelectedValue; ClaimScopeListProcessingForDisplay(GetScopes(claim), GetScopeTypeByButtonSelected()); totalTextBox.IsEnabled = true; DisplayScopeInfo(GetScopes(claim), GetScopeTypeByButtonSelected(), claim); } bab = false; }
public async Task GetSumOfPaymentsByClaimID(DTO_Claim token) { try { var response = await client.PostAsJsonAsync(string.Format(@"{0}{1}", URL, "GetSumOfPaymentsByClaimID"), token); response.EnsureSuccessStatusCode(); CalculatedResults = await response.Content.ReadAsAsync <DTO_CalculatedResults>(); } catch (Exception ex) { } }
public async Task GetScopesByClaimID(DTO_Claim token) { try { var response = await client.PostAsJsonAsync(string.Format(@"{0}{1}", URL, "GetScopesByClaimID"), token); response.EnsureSuccessStatusCode(); ScopesList = await response.Content.ReadAsAsync <List <DTO_Scope> >(); } catch (Exception ex) { } }
public async Task AddClaim(DTO_Claim token) { try { var response = await client.PostAsJsonAsync(string.Format(@"{0}{1}", URL, "AddClaim"), token); response.EnsureSuccessStatusCode(); Claim = await response.Content.ReadAsAsync <DTO_Claim>(); } catch (Exception ex) { } }
public Claim(DTO_Claim claim) { this._claimID = claim.ClaimID; this._customerID = claim.CustomerID; this._leadID = claim.LeadID; this._billingID = claim.BillingID; this._propertyID = claim.PropertyID; this._insuranceCompanyID = claim.InsuranceCompanyID; this._insuranceClaimNumber = claim.InsuranceClaimNumber; this._mrnClaimNumber = claim.MRNNumber; this._lossDate = claim.LossDate; this._mortgageAccount = claim.MortgageAccount; this._mortgageCompany = claim.MortgageCompany; this._isOpen = claim.IsOpen; }
public async Task GetClaimContactsByClaimID(DTO_Claim token) { try { var response = await client.PostAsJsonAsync(string.Format(@"{0}{1}", URL, "GetClaimContactsByClaimID"), token); response.EnsureSuccessStatusCode(); ClaimContacts = await response.Content.ReadAsAsync <DTO_ClaimContacts>(); } catch (Exception e) { Console.Write(e.StackTrace); } }
async private Task <bool> CheckForExistingDocument(int DocumentTypeID) { // prototype unchecked at this point to validate that the file about to be scheduled for upload is not existant and if so should it be overwritten or kept DTO_Claim claim = new DTO_Claim(); claim.MRNNumber = ClaimList.SelectedItem.ToString(); DTO_ClaimDocument claimdoc = new DTO_ClaimDocument(); await s1.GetClaimDocumentsByClaimID(claim); List <DTO_ClaimDocument> doclist = new List <DTO_ClaimDocument>(); foreach (DTO_ClaimDocument d in doclist) { if (d.DocTypeID.ToString() != (DocumentTypeID).ToString()) { return(true); } } return(false); }
async public Task <string> UpdateClaim(DTO_Claim token) { Claim = JsonConvert.DeserializeObject <DTO_Claim>(await MakeRequest(token, "UpdateClaim")); return(Claim.Message); }
async public Task <string> GetInspectionsByClaimID(DTO_Claim token) { InspectionsList = JsonConvert.DeserializeObject <List <DTO_Inspection> >(await MakeRequest(token, "GetInspectionsByClaimID")); return(InspectionsList.Last().Message); }
async public Task <string> GetClaimByClaimID(DTO_Claim token) { Claim = JsonConvert.DeserializeObject <DTO_Claim>(await MakeRequest(token, "GetClaimByClaimID")); return(Claim.Message); }
private async Task <bool> AddScope(DTO_Claim claim, int typescope) { int claimstatustypeid = 0; switch (typescope) { case 1: { claimstatustypeid = 4; //estimate 4 break; } case 2: { claimstatustypeid = 6; //originalscope 6 break; } case 3: { claimstatustypeid = 10; //newscope(aka) supplementsettled 10 break; } } await s1.AddScope(new DTO_Scope { ClaimID = claim.ClaimID, Deductible = double.Parse(deductibleTextBox.Text), Exterior = double.Parse(exteriorTextBox.Text), Interior = double.Parse(interiorTextBox.Text), Gutter = double.Parse(gutterTextBox.Text), ScopeTypeID = typescope, Tax = double.Parse(taxTextBox.Text), OandP = double.Parse(oandPTextBox.Text), Total = double.Parse(totalTextBox.Text), RoofAmount = double.Parse(Roof.Text) }); if (s1.Scope.Message == null) { await s1.AddClaimStatus(new DTO_ClaimStatus { ClaimID = claim.ClaimID, ClaimStatusTypeID = claimstatustypeid, ClaimStatusDate = DateTime.Today }); if (s1.ClaimStatus.Message == null) { MessageBox.Show(s1.ClaimStatus.ClaimStatusID.ToString()); } else { MessageBox.Show(s1.ClaimStatus.Message); } MessageBox.Show(s1.Scope.ScopeID.ToString()); } else { MessageBox.Show(s1.Scope.Message); } return(true); }
private DTO_Scope DisplayScopeInfo(List <DTO_Scope> scopelist, int typescope, DTO_Claim c) { DTO_Scope t = new DTO_Scope(); if (scope != null && c != null && typescope > 0 && typescope < 4) { foreach (DTO_Scope s in scopelist) { if (s.ScopeTypeID == typescope) { bool b = s.ScopeID.Equals(t.ScopeID); if (!b) { SetDisplayToScopeTypeIDByScope(s); deductibleTextBox.Text = s.Deductible.ToString(); oandPTextBox.Text = s.OandP.ToString(); interiorTextBox.Text = s.Interior.ToString(); gutterTextBox.Text = s.Gutter.ToString(); totalTextBox.Text = s.Total.ToString(); exteriorTextBox.Text = s.Exterior.ToString(); taxTextBox.Text = s.Tax.ToString(); Roof.Text = s.RoofAmount.ToString(); return(scope); } else { return(t); } } } } return(t); }