private async void EvtEliminarPrestatario(object sender, EventArgs e) { try { Borrower borro = await deleteBorrower(borrower.id); if (borro != null) { await this.DisplayAlert("Exitoso", "Usuario eliminado de manera satisfactoria", "Ok"); await Navigation.PushAsync(new UsersTable()); } else { await DisplayAlert("Fallido", "Datos invalidos", "Ok"); } } catch { await DisplayAlert("Fallido", "Ingrese los campos", "Ok"); } }
private async void EvtEditarPrestatario(object sender, EventArgs e) { try { Borrower borro = await editBorrower(EntryNombre.Text, EntryCC.Text, EntryTelefono.Text, Convert.ToSingle(EntryCantidad.Text), Convert.ToSingle(EntryPorcentaje.Text), Int32.Parse(EntryMeses.Text)); if (borro != null) { await this.DisplayAlert("Exitoso", "Usuario actualizado de manera satisfactoria", "Ok"); await Navigation.PushAsync(new UsersTable()); } else { await DisplayAlert("Fallido", "Datos invalidos", "Ok"); } } catch { await DisplayAlert("Fallido", "Ingrese los campos", "Ok"); } }
// GET: Return book: public ActionResult Return(int?id) { if (id == null) { // TODO: ERROR/EXCEPTION HANDLING return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } // check this is a valid book record Book book = db.Books.Find(id); if (book == null) { // TODO: ERROR/EXCEPTION HANDLING return(HttpNotFound()); } // Make book available book.isAvailable = true; db.Entry(book).State = EntityState.Modified; db.SaveChanges(); // check borrower record against the book Borrower borrower = dbBorrower.Borrowers.Find(book.ID); if (borrower == null) { // TODO: ERROR/EXCEPTION HANDLING return(HttpNotFound()); } // update the borrower record with return date borrower.ReturnDate = DateTime.Now; dbBorrower.Entry(borrower).State = EntityState.Modified; dbBorrower.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Borrow(int id /* bookid */) { try { using (Context ctx = new Context()) { string BorrowerName = User.Identity.Name; Borrower thisUser = ctx.BorrowerSecuredFindByName(BorrowerName); if (null == thisUser) { throw new Exception($"Borrower Not Found: '{BorrowerName}'"); } Book thisBook = ctx.BookFindByID(id); if (null == thisBook) { throw new Exception($"Book Not Found, id:'{id}'"); } // see if the book is checked out already var history = ctx.RatedBorrowingGetBorrowersRelatedToBook(id); var checkedout = (history.Where(b => b.isCheckedOut == true)).ToList(); if (checkedout.Count > 0) { return(View("CheckedOut", checkedout)); } // this is the Junction to a Many-Many. // This is duplicatable, and has extra data. VMBorrowing Borrowing = new VMBorrowing(thisBook, thisUser); Borrowing.DueDate = DateTime.Now.AddDays(21); return(View(Borrowing)); } } catch (Exception ex) { return(View("Exception", ex)); } }
private void btnAdd_Click(object sender, EventArgs e) { if (btnAdd.Text.Equals("Add")) { txtAdr.Text = ""; txtEmail.Text = ""; txtName.Text = ""; txtPhone.Text = ""; txtSex.Text = ""; btnAdd.Text = "Save"; txtborrowerNumber.ReadOnly = true; txtborrowerNumber.Text = "" + (m.GetBorrowerNumberMax() + 1); setBtn(1); } else { b = new Borrower(int.Parse(txtborrowerNumber.Text), txtName.Text, Char.Parse(txtSex.Text), txtAdr.Text, txtPhone.Text, txtEmail.Text); //b.Name = txtName.Text; //b.Address = txtAdr.Text; //b.Email = txtEmail.Text; //b.Sex = Char.Parse(txtSex.Text); //b.Telephone = txtPhone.Text; if (m.Insert(b)) { MessageBox.Show("Add success!!!"); } else { MessageBox.Show("Can't add borrower!!!"); } showData(); btnAdd.Text = "Add"; txtborrowerNumber.ReadOnly = false; setBtn(2); } }
public IActionResult Edit(Borrower borrower) { if (ModelState.IsValid) { if (borrower.BorrowerId == 0) { //context.Borrowers.Add(borrower); context.Database.ExecuteSqlRaw("execute sp_ins_borrower @p0, @p1, @p2, @p3", parameters: new[] { borrower.FName, borrower.LName, borrower.Phone.ToString(), borrower.Email }); } else { //context.Borrowers.Update(borrower); context.Database.ExecuteSqlRaw("execute sp_upd_borrower @p0, @p1, @p2, @p3, @p4", parameters: new[] { borrower.BorrowerId.ToString(), borrower.FName, borrower.LName, borrower.Phone.ToString(), borrower.Email.ToString() }); } context.SaveChanges(); return(RedirectToAction("Index", "Borrower")); } else { ViewBag.Action = (borrower.BorrowerId == 0) ? "Add" : "Edit"; return(View(borrower)); } }
private void btnEdit_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count == 0) { MessageBox.Show("Please chose a row"); return; } else { if (btnEdit.Text.Equals("Edit")) { setBtn(3); } else { int borrowerNumber = int.Parse(dataGridView1.SelectedRows[0].Cells["borrowerNumber"].Value.ToString()); b = new Borrower(borrowerNumber, txtName.Text, Char.Parse(txtSex.Text), txtAdr.Text, txtPhone.Text, txtEmail.Text); //b.BorrowerNumber = borrowerNumber; // b.Name = txtName.Text; //b.Address = txtAdr.Text; //b.Email = txtEmail.Text; //b.Sex = txtSex.Text; //b.Telephone = txtPhone.Text; if (m.Edit(b)) { MessageBox.Show("Edit success"); showData(); } else { MessageBox.Show("You can Edit this borrower!!!"); } setBtn(4); } } }
public static Borrower GetBorrower(int borrowerNumber) { SqlConnection conn = new SqlConnection(strConn); conn.Open(); SqlCommand cmd = new SqlCommand("select * from Borrower where borrowerNumber = @bn", conn); cmd.Parameters.AddWithValue("@bn", borrowerNumber); Borrower b = new Borrower(); using (SqlDataReader reader = cmd.ExecuteReader()) { while (reader.Read()) { b.Name = (string)reader["name"]; //b.Sex = (char)reader["sex"]; b.Address = (string)reader["address"]; b.Telephone = (string)reader["telephone"]; b.Email = (string)reader["email"]; } conn.Close(); } return(b); }
/// <summary> /// The object factory for a particular data collection instance. /// </summary> public virtual void CreateObjectsFromData(Borrowers borrowers, System.Data.SqlClient.SqlDataReader data) { // Do nothing if we have nothing if (data == null) { return; } // Create a local variable for the new instance. Borrower newobj = null; // Iterate through the data reader while (data.Read()) { // Create a new object instance newobj = System.Activator.CreateInstance(borrowers.ContainsType[0]) as Borrower; // Let the instance set its own members newobj.SetMembers(ref data); // Add the new object to the collection instance borrowers.Add(newobj); } }
public IHttpActionResult UpdateBorrowe(int id, Borrower borrower) { if (!ModelState.IsValid) { throw new HttpResponseException(HttpStatusCode.BadRequest); } var borrowerInDb = _db.Borrowers.SingleOrDefault(b => b.Id == id); if (borrowerInDb == null) { throw new HttpResponseException(HttpStatusCode.NotFound); } borrowerInDb.Name = borrower.Name; borrowerInDb.Surname = borrower.Surname; borrowerInDb.NationalId = borrower.NationalId; borrowerInDb.BirthDate = borrower.BirthDate; borrowerInDb.Address = borrower.Address; borrowerInDb.Phone = borrower.Phone; _db.SaveChanges(); return(Ok(borrowerInDb)); }
protected void Page_Load(object sender, EventArgs e) { _borrowerId = Request.QueryString["borrowerId"]; var account = new Borrower(); account.Find(_borrowerId); if (!Page.IsPostBack) { lblId.Text = account.BorrowerId; lblFirstName.Text = account.FirstName; lblLastName.Text = account.LastName; lblTelephone.Text = account.TelNumber; lblEmail.Text = account.Email; lblAccountType.Text = account.GetBorrowerTypeDescription(account.BorrowerType); rdLive.Checked = account.Status.Trim() == "Live"; rdSuspended.Checked = account.Status.Trim() == "Suspended"; rptLoans.DataSource = account.Loans; rptLoans.DataBind(); rptFines.DataSource = account.Fines; rptFines.DataBind(); } }
protected void btnSave_Click(object sender, EventArgs e) { int add = (int)Session["add"]; int borrowerNumber = (int)Session["borrowerNumber"]; Borrower c = new Borrower(); c.BorrowerNumber = borrowerNumber; c.Name = txtName.Text; c.Sex = txtSex.Text.ToCharArray()[0]; c.Address = txtAdd.Text; c.Telephone = txtPhone.Text; c.Email = txtEmail.Text; if (add == 1) { BorrowerDAO.Insert(c); } else { BorrowerDAO.Edit(c); } ObjectDataSource1.Select(); GridView1.DataBind(); }
public async Task <ActionResult <Result> > Create(Borrower borrower) { var result = await _borrowerService.Add(new Borrower { Id = Guid.NewGuid().ToString(), Name = borrower.FirstName + borrower.MiddleName + borrower.LastName, FirstName = borrower.FirstName, MiddleName = borrower.MiddleName, LastName = borrower.LastName, Email = borrower.Email, gender = borrower.gender, MailingAddress = borrower.MailingAddress, StreetAddress = borrower.StreetAddress, Phone = borrower.Phone, CreatedUsername = borrower.CreatedUsername, CreatedOn = DateTime.Now, UpdatedUsername = null, UpdatedOn = default(DateTime), Comments = "Borrower Entity Creation" }); return(Ok(result)); }
protected void btCheckMember_Click(object sender, EventArgs e) { lbError.Visible = false; int borrowerNumber; try { borrowerNumber = int.Parse(txtMemberCode.Text); } catch { lbError.Visible = true; lbError.Text = "Borrower number must be a integer!"; txtMemberCode.Focus(); return; } Borrower b = BorrowerDAO.GetBorrower(borrowerNumber); if (b == null) { lbError.Visible = true; lbError.Text = String.Format("Borrower number {0} does't exist!", borrowerNumber); txtMemberCode.Focus(); return; } txtName.Text = b.Name; View(); if (GridView1.Rows.Count >= 1) { lbError.Visible = true; lbError.Text = "You has already reserved !!!"; txtMemberCode.Focus(); return; } displayButtons(2); }
public ActionResult Login() { if (Session["Borrower"] != null) { return(RedirectToAction("Index")); } if (Request.HttpMethod == "POST") { string login = Request.Form["username"]; string password = Settings.SecureString(Request.Form["password"]); Borrower borrower = null; // Let's try to obtain the requested borrower by its login and password try { borrower = Borrower.getByLoginAndPasswd(login, password); } catch { return(View("Error500")); } if (borrower == null) { ViewBag.error = "Please verify your login information."; } else { Session["Borrower"] = borrower; return(RedirectToAction("Index")); } } return(View()); }
private void View(Borrower borrower) { DataTable dt = new DataTable(); dt = ReserveDAO.GetDataTableReserve(borrower.BorrowerNumber); /* foreach (DataRow dr in dt.Rows) * { * dr[3] = DateTime.Parse((dr[3].ToString())).ToString("dd/MM/yyyy"); * }*/ DataView dv = new DataView(dt); GridView1.DataSource = dv; GridView1.DataBind(); try { GridViewRow row = GridView1.Rows[0]; row.Cells[3].Text = DateTime.Parse((row.Cells[3].Text.ToString())).ToString("dd/MM/yyyy"); } catch { } }
protected void HandlerFindUser(object sender, EventArgs e) { var account = new Borrower(); if (account.Find(txtStudentNumber.Text.Trim())) { pnUserInfo.Visible = true; _borrowerId = account.BorrowerId; lblUser.Text = $"{account.FirstName} {account.LastName}"; lblLoans.Text = $"{account.Loans.FindAll(loan => loan.LoanReturnDate == null).Count.ToString()} / {account.GetBorrowerMaxLoans()}"; lblFines.Text = account.Fines.FindAll(fine => fine.FineStatus.Trim() == "DUE").Sum(fine => fine.FineAmount).ToString("C"); lblResrvation.Text = account.Reservations.FindAll(reservation => reservation.ClearedDate == null).Count .ToString(); rptCurrentLoans.DataSource = account.Loans.FindAll(loan => loan.LoanReturnDate == null); rptCurrentLoans.DataBind(); rptHistoryLoans.DataSource = account.Loans.FindAll(loan => loan.LoanReturnDate != null); rptHistoryLoans.DataBind(); rptCurrentReservations.DataSource = account.Reservations.FindAll(reservation => reservation.ClearedDate == null); rptCurrentReservations.DataBind(); rptHistoryReservations.DataSource = account.Reservations.FindAll(reservation => reservation.ClearedDate != null); rptHistoryReservations.DataBind(); rptCurrentFines.DataSource = account.Fines.FindAll(fine => fine.FineStatus.Trim() == "DUE"); rptCurrentFines.DataBind(); var finesWithPayments = new FineCollection(account.BorrowerId); rptHistoryFines.DataSource = finesWithPayments.FinesWithPayments(); rptHistoryFines.DataBind(); } }
protected void btnSave_Click(object sender, EventArgs e) { int add = (int)Session["add"]; Borrower b = new Borrower(); b.Name = txtName.Text; b.Sex = char.Parse(txtSex.Text); b.Address = txtAddress.Text; b.Telephone = txtTelephone.Text; b.Email = txtEmail.Text; if (add == 1) { b.BorrowerNumber = BorrowerDAO.GetBorrowerNumberMax() + 1; BorrowerDAO.Insert(b); } else if (add == 2) { b.BorrowerNumber = Int32.Parse(GridView1.SelectedRow.Cells[1].Text); BorrowerDAO.Update(b); } displayButtons(1); ObjectDataSource1.Select(); GridView1.DataBind(); }
private void CheckExpiration() { if (_checking) { return; } _checking = true; var expired = Takeout.Cache.Where(x => !x.IsReturned && IsExpired(x.TakeoutDate)).ToList(); foreach (var takeout in expired) { var notification = Notification.Cache.FirstOrDefault(x => x.NotificationType == Notification.NotificationTypes.TakeoutExpired && x.RecordId == takeout.Id); if (notification != null) { continue; } var borrower = Borrower.GetById(takeout.BorrowerId); var book = Book.GetById(takeout.BookId); notification = new Notification() { Thumbnail = book.Thumbnail, RecordId = takeout.Id, NotificationType = Notification.NotificationTypes.TakeoutExpired, Title = "BOOK NOT RETURNED", Message = $"{borrower.Fullname} did not return the book {book.Title} borrowed last {takeout.TakeoutDate.ToShortDateString()}." }; App.Current.Dispatcher.Invoke(() => notification.Save()); Messages.Enqueue(notification); Resources.chime_glass_note_hi.Play(); } _checking = false; }
private void btnMember_Click(object sender, EventArgs e) { int borrowerNumber; try { borrowerNumber = int.Parse(txtBorrowerNumber.Text); } catch { MessageBox.Show("Borrower number must be a integer!"); txtBorrowerNumber.Focus(); return; } Borrower b = BorrowerDAO.GetBorrower(borrowerNumber); if (b == null) { MessageBox.Show(String.Format("Borrower number {0} does't exist!", borrowerNumber)); txtBorrowerNumber.Focus(); return; } txtName.Text = b.Name; View(); displayButtons(2); }
public static Borrower GetBorrower(int borrowerNumber) { SqlConnection conn = DAO.getConnections(); string sql = "SELECT * FROM Borrower WHERE borrowerNumber = @borrowerNumber"; SqlCommand command = new SqlCommand(sql, conn); command.Parameters.Add(new SqlParameter("@borrowerNumber", borrowerNumber)); conn.Open(); SqlDataReader reader = command.ExecuteReader(); while (reader.Read()) { Borrower s = new Borrower(); s.BorrowerNumber = Int32.Parse(reader["borrowerNumber"].ToString()); s.Name = reader["name"].ToString(); s.Sex = Char.Parse(reader["sex"].ToString()); s.Address = reader["address"].ToString(); s.Telephone = reader["telephone"].ToString(); s.Email = reader["email"].ToString(); conn.Close(); return(s); } return(null); }
public bool CreateBorrower(Borrower borrower) { connection(); SqlCommand check = new SqlCommand("Select count(*) from borrower where ssn ='" + borrower.SSN + "';", con); con.Open(); SqlDataReader rdr = check.ExecuteReader(); int num = 0; while (rdr.Read()) { num = Convert.ToInt32(rdr[0]); } con.Close(); if (num == 0) { connection(); SqlCommand command = new SqlCommand("CreateBorrower", con); command.CommandType = System.Data.CommandType.StoredProcedure; command.Parameters.AddWithValue("@ssn", borrower.SSN); command.Parameters.AddWithValue("@bname", borrower.Name); command.Parameters.AddWithValue("@address", borrower.Address); command.Parameters.AddWithValue("@phone", borrower.Phone); con.Open(); command.ExecuteNonQuery(); con.Close(); return(true); } else { return(false); } }
public static Borrower GetBorrower(int borrowerNum) { SqlConnection conn = new SqlConnection(strConn); SqlCommand cmd = new SqlCommand("Select * from Borrower where borrowerNumber = @b", conn); cmd.Parameters.AddWithValue("@b", borrowerNum); Borrower b = null; conn.Open(); SqlDataReader rd = cmd.ExecuteReader(); while (rd.Read()) { b = new Borrower(); b.BorrowerNumber = int.Parse(rd["borrowerNumber"].ToString()); b.Name = rd["name"].ToString(); b.Sex = char.Parse(rd["sex"].ToString()); b.Address = rd["address"].ToString(); b.Telephone = rd["telephone"].ToString(); b.Email = rd["email"].ToString(); } conn.Close(); return(b); }
public ActionResult Details(int id) { Borrower borrower = borrowerRepository.GetByID(id); return(View(borrower)); }
public Assets(Borrower borrower) : base() { _borrower = borrower; }
public void SetBorrower(Borrower borrower) { borrowers.Remove(borrower); borrowers.Add(borrower); WriteData(); }
private bool CheckBorrowerExist(Borrower borrower) { try { string query = "SELECT Count(*) FROM borrowers WHERE id = @id"; using (MySqlCommand cmd = new MySqlCommand(query, db.ConnectionManager.Connection)) { cmd.Prepare(); cmd.Parameters.AddWithValue("@id", borrower.Id); long result = (long)cmd.ExecuteScalar(); return result > 0; } } catch (MySqlException ex) { MessageBox.Show(ex.Message); return false; } }
public string PerformAction(int activityId) { AvailableActivities selectedActivity = _descriptionOfActivities.Keys.ElementAt(activityId); switch (selectedActivity) { case AvailableActivities.AddBookToCatalog: Console.Write("Title: "); string title = Console.ReadLine().Trim(); Console.Write("Author: "); string author = Console.ReadLine().Trim(); Console.Write("ISBN: "); string isbn = Console.ReadLine().Trim(); if (string.IsNullOrWhiteSpace(title) || string.IsNullOrWhiteSpace(author) || string.IsNullOrWhiteSpace(isbn)) { return("Incorrect data provided. Try again."); } try { if (_bookRepository.AddBookToCatalog(title, author, isbn)) { return($"Book \"{title}\" has been added to the catalog."); } else { throw new Exception(); } } catch (Exception) { return($"[Warning] Book \"{title}\" has not been added to the catalog. Try again."); } case AvailableActivities.RemoveBookFromCatalog: try { BookRecord bookToRemove = GetBookRecord(); if (bookToRemove != null) { if (_bookRepository.RemoveBookFromCatalog(bookToRemove)) { return("Book has been removed from catalog correctly."); } else { throw new Exception(); } } else { return("[Warning] The book was not found. Try again."); } } catch (Exception) { return($"[Warning] Book has not been removed from catalog. Try again."); } case AvailableActivities.SearchBookByParameter: try { BookRecord bookRecord = GetBookRecord(); if (bookRecord != null) { string response = $"The book was found. Title: \"{bookRecord.Book.Title}\", author: {bookRecord.Book.Author}, ISBN: {bookRecord.Book.ISBN}."; if (bookRecord.LastBorrowDate == DateTime.MinValue || bookRecord.LastBorrowDate == null) { response += "\n(not borrowed yet)"; } else { response += $"\nBorrowed by {bookRecord.LastBorrower.Name} {bookRecord.LastBorrower.LastName} (Date: {bookRecord.LastBorrowDate.ToShortDateString()})"; } return(response); } } catch (Exception) { } return("[Warning] The book was not found. Try again."); case AvailableActivities.SearchBooksNotBorrowedForWeeks: try { Console.Write("Number of weeks: "); int weeks = int.Parse(Console.ReadLine().Trim()); try { List <BookRecord> booksNotBorrowed = _bookRepository.GetBooksNotBorrowedForWeeks(weeks); foreach (BookRecord bookNotBorrowed in booksNotBorrowed) { Console.WriteLine($"\nBook: \"{bookNotBorrowed.Book.Title}\" {bookNotBorrowed.Book.Author} ISBN: {bookNotBorrowed.Book.ISBN}."); if (bookNotBorrowed.LastBorrowDate == DateTime.MinValue || bookNotBorrowed.LastBorrowDate == null) { Console.WriteLine("(not borrowed yet)"); } else { Console.WriteLine($"Borrowed by {bookNotBorrowed.LastBorrower.Name} {bookNotBorrowed.LastBorrower.LastName} (Date: {bookNotBorrowed.LastBorrowDate.ToShortDateString()})"); } } return($"{booksNotBorrowed.Count} records were found correctly."); } catch (Exception) { return("[Warning] There was a problem downloading the data. Try again."); } } catch (Exception) { return("[Warning] Incorrect data provided. Try again."); } case AvailableActivities.BorrowBook: try { Console.Write("Borrower name: "); string borrowerName = Console.ReadLine().Trim(); Console.Write("Borrower last name: "); string borrowerLastName = Console.ReadLine().Trim(); if (string.IsNullOrWhiteSpace(borrowerName) || string.IsNullOrWhiteSpace(borrowerLastName)) { return("Incorrect data provided. Try again."); } Borrower borrower = new Borrower() { Name = borrowerName, LastName = borrowerLastName }; BookRecord bookToBorrow = GetBookRecord(); if (bookToBorrow != null) { bookToBorrow.LastBorrower = borrower; bookToBorrow.LastBorrowDate = DateTime.Now; if (_bookRepository.BorrowBook(bookToBorrow)) { return("Book has been borrowed correctly."); } else { return("[Warning] Book has not been borrowed. Try again."); } } else { return("[Warning] The book was not found. Try again."); } } catch (Exception) { return($"[Warning] Book has not been borrowed. Try again."); } case AvailableActivities.GetCurrentBorrowers: try { List <BorrowerRecord> borrowers = _bookRepository.GetCurrentBorrowers(); foreach (BorrowerRecord borrower in borrowers) { Console.WriteLine($"{borrower.LastBorrower.Name} {borrower.LastBorrower.LastName}: {borrower.NumberOfBooksBorrowed} books"); } return($"{borrowers.Count} records were found correctly."); } catch (Exception) { return("[Warning] There was a problem downloading the data. Try again."); } } return("[Error] Action for selected activity is not defined."); }
private void BookItem(Inventory item, Borrower borrower, DateTime? tanggal_mulai, DateTime? tanggal_selesai) { if (!CheckBorrowerExist(borrower)) { try { string query = "INSERT INTO borrowers(id, nama, jenis, no_telp) VALUES(@id, @nama, @jenis, @no_telp)"; using (MySqlCommand cmd = new MySqlCommand(query, db.ConnectionManager.Connection)) { cmd.Prepare(); cmd.Parameters.AddWithValue("@id", borrower.Id); cmd.Parameters.AddWithValue("@nama", borrower.Nama); cmd.Parameters.AddWithValue("@jenis", borrower.Jenis); cmd.Parameters.AddWithValue("@no_telp", borrower.NomorTelp); cmd.ExecuteNonQuery(); } } catch (MySqlException ex) { MessageBox.Show(ex.Message); return; } } try { string query = "UPDATE inventory SET id_peminjam = @id_peminjam, tanggal_mulai = @tanggal_mulai, tanggal_selesai = @tanggal_selesai WHERE id = @item_id"; using (MySqlCommand cmd = new MySqlCommand(query, db.ConnectionManager.Connection)) { cmd.Prepare(); cmd.Parameters.AddWithValue("@id_peminjam", borrower.Id); cmd.Parameters.AddWithValue("@tanggal_mulai", tanggal_mulai); cmd.Parameters.AddWithValue("@tanggal_selesai", tanggal_selesai); cmd.Parameters.AddWithValue("@item_id", item.Id); cmd.ExecuteNonQuery(); } } catch (MySqlException ex) { MessageBox.Show(ex.Message); return; } }
private void Button_Selesai_Click(object sender, RoutedEventArgs e) { string id_jenis = comboBox_Jenis_Barang.SelectedValue.ToString(); int jumlah = int.Parse(textbox_Jumlah.Text); List<Inventory> inventory = GetInventory(id_jenis); if (inventory.Count < jumlah) { MessageBox.Show("Jumlah barang yang tersedia tidak mencukupi"); } else { /* Informasi Peminjaman */ string id_peminjam = textbox_Id.Text; string nama_peminjam = textbox_Nama.Text; string no_hp = textbox_Nomor_HP.Text; string jenis_peminjam = null; if (radioButton_Dosen.IsChecked != null && radioButton_Dosen.IsChecked == true) jenis_peminjam = (string)Application.Current.FindResource("jenisPeminjamDosen"); if (radioButton_Mahasiswa.IsChecked != null && radioButton_Mahasiswa.IsChecked == true) jenis_peminjam = (string)Application.Current.FindResource("jenisPeminjamMahasiswa"); if (radioButton_Pegawai.IsChecked != null && radioButton_Pegawai.IsChecked == true) jenis_peminjam = (string)Application.Current.FindResource("jenisPeminjamPegawai"); DateTime? tanggal_mulai = Date_Peminjaman.SelectedDate; DateTime? tanggal_selesai = Date_Pengembalian.SelectedDate; Borrower borrower = new Borrower(id_peminjam, nama_peminjam, jenis_peminjam, no_hp); for (var index = 0; index < jumlah; ++index) { Inventory item = inventory[index]; BookItem(item, borrower, tanggal_mulai, tanggal_selesai); } } }
public void LoadBorrowerList(Borrower borrower) { ArrayList list = database.LoadBorrowerItems (borrower, table); items.Clear(); foreach (Item item in list) { this.Insert (item); } Changed(); }
public void OnOkButtonClicked(object o, EventArgs args) { int id = Int32.MaxValue; Entry entry = (Entry) borrowerComboBox.Child; if (entry.Text != null && !entry.Text.Equals ("")) { foreach (Borrower borrower in borrowers) { if (borrower.Name.Equals (entry.Text)) { id = borrower.Id; break; } } if (id == Int32.MaxValue) { id = database.AddBorrower (entry.Text); } Borrower newBorrower = new Borrower (id, entry.Text, null); database.LendItem (item, newBorrower); this.Destroy(); } else { Gtk.Dialog dialog = new MessageDialog (this, DialogFlags.DestroyWithParent, MessageType.Error, ButtonsType.Close, Mono.Posix.Catalog.GetString ("You must write the borrower name")); dialog.Run (); dialog.Destroy(); } }
public int LendItem(Item item, Borrower borrower) { if (debug) Console.WriteLine ("DB:LendItem"); StringBuilder sql = new StringBuilder (200); sql = sql.Append ("INSERT INTO lends VALUES (NULL, "); sql = sql.Append (borrower.Id); sql = sql.Append (", '"); sql = sql.Append (item.Table); sql = sql.Append ("', "); sql = sql.Append (item.Id); sql = sql.Append (")"); command.CommandText = sql.ToString(); command.ExecuteNonQuery(); return ((SqliteCommand)command).LastInsertRowID(); }
public ArrayList LoadBorrowerItems(Borrower borrower, string tableName) { if (debug) Console.WriteLine ("DB:LoadBorrowerItems"); ArrayList list = new ArrayList (); // string sql = "SELECT * from lends WHERE table_name='"+tableName+"' AND borrower="+borrower.Id; string sql = "SELECT * from lends WHERE borrower="+borrower.Id; command.CommandText = sql; SqliteDataReader reader = command.ExecuteReader (); while (reader.Read ()) { if (reader["item_id"] != null && !reader["item_id"].ToString().Equals("")) { string table = (string)reader["table_name"]; int itemId = Int32.Parse(reader["item_id"].ToString()); list.Add (this.GetItem (table, itemId)); } } reader.Close(); return list; }
public CreditScore(Borrower borrower) : base() { _borrower = borrower; }
public Liabilities(Borrower borrower) : base() { _borrower = borrower; }
public IActionResult Delete(Borrower borrower) { context.Borrower.Remove(borrower); context.SaveChanges(); return(RedirectToAction("List", "Borrower")); }
public VMBorrower() { TheEmbeddedItem = new Borrower(); }
public IActionResult Delete(int?ID) { Borrower model = _Borrower.GetBorrower(ID); return(View(model)); }
/// <summary> /// Creates a new instance of an existing (persisted) loan application. /// </summary> /// <param name="appId">The identity of the loan application.</param> public LoanApplication(long appId) : base(appId) { // TODO: add additional fill methods for the rest of the loan object // load up the data information MISMO.BusinessObjects.DataInformationCollection dats = this.GetDataInformationCollection(); if (dats != null && dats.Count > 0) { _datainformation = new DataInformation(); MISMO.Entities.DataInformationBase datbase = dats[0]; _datainformation.SetMembers(ref datbase); } // load up the additional case data. MISMO.BusinessObjects.AdditionalCaseDataCollection addcasecol = this.GetAdditionalCaseDataCollection(); if (addcasecol != null && addcasecol.Count > 0) { MISMO.Entities.AdditionalCaseDataBase addcasebase = addcasecol[0] as MISMO.Entities.AdditionalCaseDataBase; _additionalcasedata = new AdditionalCaseData(); _additionalcasedata.SetMembers(ref addcasebase); } // load up the down payment information _downpayments = this.GetDownPayments(); // load up the interviewer information MISMO.BusinessObjects.InterviewerInformationCollection intvcol = this.GetInterviewerInformationCollection(); if (intvcol != null && intvcol.Count > 0) _interviewer = intvcol[0]; // load up the loan product data MISMO.BusinessObjects.LoanProductDataCollection loanproducts = this.GetLoanProductDataCollection(); if (loanproducts != null && loanproducts.Count > 0) { MISMO.Entities.LoanProductDataBase lpbase = loanproducts[0]; _loanproductdata = new LoanProductData(); _loanproductdata.SetMembers(ref lpbase); } // load up the loan purpose MISMO.BusinessObjects.LoanPurposes purps = this.GetLoanPurposes(); if (purps != null && purps.Count > 0) { MISMO.Entities.LoanPurposeBase purpbase = purps[0]; _purpose = new LoanPurpose(); _purpose.SetMembers(ref purpbase); } // load up the loan qualification information MISMO.BusinessObjects.LoanQualifications lqcol = this.GetLoanQualifications(); if (lqcol != null && lqcol.Count > 0) { MISMO.Entities.LoanQualificationBase lqbase = lqcol[0] as MISMO.Entities.LoanQualificationBase; _loanqualification.SetMembers(ref lqbase); } // load up the mortgage terms. MISMO.BusinessObjects.MortgageTermsCollection mtgterms = this.GetMortgageTermsCollection(); if (mtgterms != null && mtgterms.Count > 0) _mortgageterms = mtgterms[0]; // loan up the property information MISMO.BusinessObjects.Properties props = this.GetProperties(); if (props != null && props.Count > 0) { _prop = new AUS.Property(); MISMO.Entities.PropertyBase propbase = props[0]; _prop.SetMembers(ref propbase); } // load up the proposed housing expenses _proposedHousingExpenses = this.GetProposedHousingExpenses(); // load up the REO properties _reoProperties = this.GetREOProperties(); // load up the title holder objects _titleholders = this.GetTitleHolders(); // load up the transaction details MISMO.BusinessObjects.TransactionDetails trandets = this.GetTransactionDetails(); if (trandets != null && trandets.Count > 0) { MISMO.Entities.TransactionDetailBase trandbase = trandets[0]; _transdetail = new AUS.TransactionDetail(); _transdetail.SetMembers(ref trandbase); } // load up the borrower information MISMO.BusinessObjects.Borrowers bws = this.GetBorrowers(); MISMO.Entities.BorrowerBase bwsbase = null; for(int i = 0, j = bws.Count; i<j; i++) { MISMO.BusinessObjects.AUS.Borrower ausbw = new Borrower(); bwsbase = bws[i] as MISMO.Entities.BorrowerBase; ausbw.SetMembers(ref bwsbase); _borrowers.Add(ausbw); } // finally update the checksum if this constructor wasn't called from a descendant. if (this.GetType() == typeof(MISMO.BusinessObjects.AUS.LoanApplication)) { RecalculateChecksum(); } }
public VMBorrower(Borrower b) { TheEmbeddedItem = b; }
/// <summary> /// Loads the loan object with information from a Fannie Mae set of data. /// </summary> /// <param name="fileBytes">The fannie data bytes.</param> protected virtual void LoadDU(byte[] fileBytes) { DUHelper du = new DUHelper(fileBytes); Exception invalidfiledata = new Exception("The file data is not a recognized Fannie Mae DU format."); #region DATA_INFORMATION // capture the versioning information int vercount = du.BeginCapture("000"); if (vercount < 1) throw invalidfiledata; else { this._datainformation = new DataInformation(); for(int i = 0; i<vercount; i++) { MISMO.BusinessObjects.DataVersion dv = new DataVersion(); dv.Name = du.ExtractCaptureData(i, 4, 3); if (dv.Name == "1") dv.Name = "1003"; dv.Number = du.ExtractCaptureData(i, 7, 5); this._datainformation.DataVersions.Add(dv); } } du.EndCapture(); if (vercount > 0 && !(this.DataInformation.DataVersions[0].Number == "3.20" || this.DataInformation.DataVersions[0].Number == "3.2") ) throw new NotImplementedException("Fannie Mae loader only supports 3.20 DU file formats."); #endregion DATA_INFORMATION #region MORTGAGE_TERMS string tempval = null; // extract information for the mortgage terms tempval = du.ExtractData("01A", 86, 30); if (tempval != string.Empty) { if (_mortgageterms == null) _mortgageterms = new MISMO.BusinessObjects.MortgageTerms(); this.MortgageTerms.AgencyCaseIdentifier = tempval; } tempval = du.ExtractData("01A", 238, 80); if (tempval != string.Empty) { if (_mortgageterms == null) _mortgageterms = new MISMO.BusinessObjects.MortgageTerms(); this.MortgageTerms.ARMTypeDescription = tempval; } tempval = du.ExtractData("01A", 131, 15); if (tempval != string.Empty) { if (_mortgageterms == null) _mortgageterms = new MISMO.BusinessObjects.MortgageTerms(); this.MortgageTerms.BaseLoanAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("01A", 131, 15); if (tempval != string.Empty) { if (_mortgageterms == null) _mortgageterms = new MISMO.BusinessObjects.MortgageTerms(); this.MortgageTerms.BorrowerRequestedLoanAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("01A", 116, 15); if (tempval != string.Empty) { if (_mortgageterms == null) _mortgageterms = new MISMO.BusinessObjects.MortgageTerms(); this.MortgageTerms.LenderCaseIdentifier = tempval; } tempval = du.ExtractData("01A", 153, 3); if (tempval != string.Empty) { if (_mortgageterms == null) _mortgageterms = new MISMO.BusinessObjects.MortgageTerms(); this.MortgageTerms.LoanAmortizationTermMonths = Convert.ToDecimal(tempval); } tempval = du.ExtractData("01A", 156, 2); if (tempval != string.Empty) { if (_mortgageterms == null) _mortgageterms = new MISMO.BusinessObjects.MortgageTerms(); switch(tempval) { case "01": { this.MortgageTerms.LoanAmortizationType = (short) MISMO.Enums.LoanAmortizationType.AdjustableRate; break; } case "04": { this.MortgageTerms.LoanAmortizationType = (short) MISMO.Enums.LoanAmortizationType.GrowingEquityMortgage; break; } case "05": { this.MortgageTerms.LoanAmortizationType = (short) MISMO.Enums.LoanAmortizationType.Fixed; break; } case "06": { this.MortgageTerms.LoanAmortizationType = (short) MISMO.Enums.LoanAmortizationType.GraduatedPaymentMortgage; break; } case "13": { this.MortgageTerms.LoanAmortizationType = (short) MISMO.Enums.LoanAmortizationType.OtherAmortizationType; break; } } } tempval = du.ExtractData("01A", 4, 2); if (tempval != string.Empty) { if (_mortgageterms == null) _mortgageterms = new MISMO.BusinessObjects.MortgageTerms(); switch(tempval) { case "01": { this.MortgageTerms.MortgageType = (short) MISMO.Enums.MortgageType.Conventional; break; } case "02": { this.MortgageTerms.MortgageType = (short) MISMO.Enums.MortgageType.VA; break; } case "03": { this.MortgageTerms.MortgageType = (short) MISMO.Enums.MortgageType.FHA; break; } case "04": { this.MortgageTerms.MortgageType = (short) MISMO.Enums.MortgageType.FarmersHomeAdministration; break; } case "07": { this.MortgageTerms.MortgageType = (short) MISMO.Enums.MortgageType.Other; break; } } } tempval = du.ExtractData("01A", 6, 80); if (tempval != string.Empty) { if (_mortgageterms == null) _mortgageterms = new MISMO.BusinessObjects.MortgageTerms(); this.MortgageTerms.OtherMortgageTypeDescription= tempval; } tempval = du.ExtractData("01A", 158, 80); if (tempval != string.Empty) { if (_mortgageterms == null) _mortgageterms = new MISMO.BusinessObjects.MortgageTerms(); this.MortgageTerms.OtherAmortizationTypeDescription = tempval; } tempval = du.ExtractData("01A", 146, 7); if (tempval != string.Empty) { if (_mortgageterms == null) _mortgageterms = new MISMO.BusinessObjects.MortgageTerms(); this.MortgageTerms.RequestedInterestRatePercent = Convert.ToDecimal(tempval); } #endregion MORTGAGE_TERMS #region PROPERTY // now let us get PROPERTY information tempval = du.ExtractData("02A", 4, 50); if (tempval != string.Empty) { if (_prop == null) _prop = new AUS.Property(); this.Property.StreetAddress = tempval; } tempval = du.ExtractData("02A", 54, 35); if (tempval != string.Empty) { if (_prop == null) _prop = new AUS.Property(); this.Property.City = tempval; } tempval = du.ExtractData("02A", 89, 2); if (tempval != string.Empty) { if (_prop == null) _prop = new AUS.Property(); this.Property.State = tempval; } tempval = du.ExtractData("GOA", 102, 35); if (tempval != string.Empty) { if (_prop == null) _prop = new AUS.Property(); this.Property.County = tempval; } tempval = du.ExtractData("02A", 91, 5); if (tempval != string.Empty) { if (_prop == null) _prop = new AUS.Property(); this.Property.PostalCode = tempval; } tempval = du.ExtractData("02A", 96, 4); if (tempval != string.Empty && _prop != null && !this.Property.PostalCodeIsNull) this.Property.PostalCode += string.Format("-{0}", tempval); tempval = du.ExtractData("02A", 100, 3); if (tempval != string.Empty) { if (_prop == null) _prop = new AUS.Property(); this.Property.FinancedNumberOfUnits = Convert.ToInt32(tempval); } tempval = du.ExtractData("02A", 185, 4); if (tempval != string.Empty) { if (_prop == null) _prop = new AUS.Property(); this.Property.StructureBuiltYear = DateTime.Parse(string.Format("12/31/{0}", tempval)); } MISMO.BusinessObjects.LegalDescription legdesc = null; tempval = du.ExtractData("02A", 105, 80); if (tempval != string.Empty) { if (_prop == null) _prop = new AUS.Property(); if (legdesc == null) { legdesc = new MISMO.BusinessObjects.LegalDescription(); this.Property.LegalDescriptions.Add(legdesc); } legdesc.TextDescription = tempval; } tempval = du.ExtractData("02A", 103, 2); if (tempval != string.Empty) { if (_prop == null) _prop = new AUS.Property(); if (legdesc == null) { legdesc = new MISMO.BusinessObjects.LegalDescription(); this.Property.LegalDescriptions.Add(legdesc); } switch(tempval) { case "F1": { legdesc.Type = (short) MISMO.Enums.LegalDescriptionType.Other; break; } case "02": { legdesc.Type = (short) MISMO.Enums.LegalDescriptionType.MetesAndBounds; break; } } } #endregion PROPERTY #region BORROWER // get the borrower information System.Collections.Specialized.StringCollection brwssncol = new System.Collections.Specialized.StringCollection(); int borrowercount = du.BeginCapture("03A"); Borrower brw = null; if (borrowercount > 0) { for(int i = 0; i<borrowercount; i++) { brw = new Borrower(); tempval = du.ExtractCaptureData(i, 15, 35); if (tempval != string.Empty) brw.FirstName = tempval; tempval = du.ExtractCaptureData(i, 50, 35); if (tempval != string.Empty) brw.MiddleName = tempval; tempval = du.ExtractCaptureData(i, 85, 35); if (tempval != string.Empty) brw.LastName = tempval; tempval = du.ExtractCaptureData(i, 120, 4); if (tempval != string.Empty) brw.NameSuffix = tempval; tempval = du.ExtractCaptureData(i, 134, 3); if (tempval != string.Empty) brw.AgeAtApplicationYears = Convert.ToDecimal(tempval); // TODO: revisit extracting borrower data in different captures zones // tempval = du.ExtractCaptureData(i, 13, 8); // if (tempval != string.Empty) brw.ApplicationSignedDate = DateTime.Parse(string.Format("{0}/{1}/{2}", tempval.Substring(4, 2), tempval.Substring(6, 2), tempval.Substring(0, 4))); tempval = du.ExtractCaptureData(i, 124, 10); if (tempval != string.Empty) { MISMO.BusinessObjects.ContactPoint cp = new ContactPoint(); cp.Type = (short) MISMO.Enums.ContactPointType.Phone; cp.Value = tempval; brw.ContactPoints.Add(cp); } tempval = du.ExtractCaptureData(i, 4, 2); switch(tempval) { case "BW": { brw.PrintPositionType = (short) MISMO.Enums.PrintPositionType.Borrower; break; } case "QZ": { brw.PrintPositionType = (short) MISMO.Enums.PrintPositionType.CoBorrower; break; } } tempval = du.ExtractCaptureData(i, 6, 9); if (tempval != string.Empty) brw.SSN = tempval; tempval = du.ExtractCaptureData(i, 140, 2); if (tempval != string.Empty) brw.DependentCount = Convert.ToByte(tempval); tempval = du.ExtractCaptureData(i, 142, 1); switch(tempval) { case "Y": { brw.JointAssetLiabilityReportingType = (short) MISMO.Enums.JointAssetLiabilityReportingType.Jointly; break; } case "N": { brw.JointAssetLiabilityReportingType = (short) MISMO.Enums.JointAssetLiabilityReportingType.NotJointly; break; } } tempval = du.ExtractCaptureData(i, 139, 1); switch(tempval) { case "M": { brw.MaritalStatusType = (short) MISMO.Enums.MaritalStatusType.Married; break; } case "S": { brw.MaritalStatusType = (short) MISMO.Enums.MaritalStatusType.Separated; break; } case "U": { brw.MaritalStatusType = (short) MISMO.Enums.MaritalStatusType.Unmarried; break; } } tempval = du.ExtractCaptureData(i, 137, 2); if (tempval != string.Empty) brw.SchoolingYears = Convert.ToDecimal(tempval); this.Borrowers.Add(brw); } } // end of borrowers section #endregion BORROWER #region DOWN_PAYMENTS // extract the down payments int downpaymentcount = du.BeginCapture("02E"); if (downpaymentcount > 0) { MISMO.BusinessObjects.DownPayment dp = null; for(int i = 0; i<downpaymentcount; i++) { dp = new MISMO.BusinessObjects.DownPayment(); tempval = du.ExtractCaptureData(i, 6, 15); if (tempval != string.Empty) dp.Amount = Convert.ToDecimal(tempval); tempval = du.ExtractCaptureData(i, 21, 80); if (tempval != string.Empty) dp.SourceDescription = tempval; tempval = du.ExtractCaptureData(i, 4, 2); switch(tempval) { case "F1": { dp.Type = (short) MISMO.Enums.DownPaymentType.CheckingSavings; break; } case "F2": { dp.Type = (short) MISMO.Enums.DownPaymentType.DepositOnSalesContract; break; } case "F3": { dp.Type = (short) MISMO.Enums.DownPaymentType.EquityOnSoldProperty; break; } case "03": { dp.Type = (short) MISMO.Enums.DownPaymentType.EquityOnPendingSale; break; } case "04": { dp.Type = (short) MISMO.Enums.DownPaymentType.GiftFunds; break; } case "F5": { dp.Type = (short) MISMO.Enums.DownPaymentType.StocksAndBonds; break; } case "10": { dp.Type = (short) MISMO.Enums.DownPaymentType.LotEquity; break; } case "09": { dp.Type = (short) MISMO.Enums.DownPaymentType.BridgeLoan; break; } case "01": { dp.Type = (short) MISMO.Enums.DownPaymentType.UnsecuredBorrowedFunds; break; } case "F6": { dp.Type = (short) MISMO.Enums.DownPaymentType.TrustFunds; break; } case "F7": { dp.Type = (short) MISMO.Enums.DownPaymentType.RetirementFunds; break; } case "11": { dp.Type = (short) MISMO.Enums.DownPaymentType.RentWithOptionToPurchase; break; } case "F8": { dp.Type = (short) MISMO.Enums.DownPaymentType.LifeInsuranceCashValue; break; } case "14": { dp.Type = (short) MISMO.Enums.DownPaymentType.SaleOfChattel; break; } case "07": { dp.Type = (short) MISMO.Enums.DownPaymentType.TradeEquity; break; } case "06": { dp.Type = (short) MISMO.Enums.DownPaymentType.SweatEquity; break; } case "02": { dp.Type = (short) MISMO.Enums.DownPaymentType.CashOnHand; break; } case "13": { dp.Type = (short) MISMO.Enums.DownPaymentType.OtherTypeOfDownPayment; break; } case "28": { dp.Type = (short) MISMO.Enums.DownPaymentType.SecuredBorrowedFunds; break; } } this.DownPayments.Add(dp); } } // end of downpaymentcount #endregion DOWN_PAYMENTS #region ADDITIONAL_CASE_DATA.MORTGAGE_SCORE int mortgagescores = du.BeginCapture("SCA"); if (mortgagescores > 0) { if (_additionalcasedata == null) _additionalcasedata = new AdditionalCaseData(); MISMO.BusinessObjects.MortgageScore mtgscore = null; for(int i = 0; i<mortgagescores; i++) { mtgscore = new MISMO.BusinessObjects.MortgageScore(); tempval = du.ExtractCaptureData(i, 10, 8); if (tempval != string.Empty) mtgscore.Date = du.ToDate(tempval); tempval = du.ExtractCaptureData(i, 4, 3); switch(tempval) { case "001": { mtgscore.Type = (short) MISMO.Enums.MortgageScoreType.PMIAuraAQIScore; break; } case "002": { mtgscore.Type = (short) MISMO.Enums.MortgageScoreType.GE_IQScore; break; } case "003": { mtgscore.Type = (short) MISMO.Enums.MortgageScoreType.UGIAccuscore; break; } } tempval = du.ExtractCaptureData(i, 7, 3); if (tempval != string.Empty) mtgscore.Value = tempval; _additionalcasedata.MortgageScores.Add(mtgscore); } } // end of mortgagescores #endregion ADDITIONAL_CASE_DATA.MORTGAGE_SCORE #region ADDITIONAL_CASE_DATA.TRANSMITTAL_DATA tempval = du.ExtractData("99B", 22, 7); if (tempval != string.Empty) { if (_additionalcasedata == null) _additionalcasedata = new AUS.AdditionalCaseData(); if (_additionalcasedata._transmitdata == null) _additionalcasedata._transmitdata = new BusinessObjects.TransmittalData(); this.AdditionalCaseData.TransmittalData.BuydownRatePercent = Convert.ToDecimal(tempval); } tempval = du.ExtractData("99B", 5, 2); if (tempval != string.Empty) { if (_additionalcasedata == null) _additionalcasedata = new AUS.AdditionalCaseData(); if (_additionalcasedata._transmitdata == null) _additionalcasedata._transmitdata = new BusinessObjects.TransmittalData(); switch(tempval) { case "01": { this.AdditionalCaseData.TransmittalData.CurrentFirstMortgageHolderType = (short) MISMO.Enums.MortgageHolderType.FNM; break; } case "02": { this.AdditionalCaseData.TransmittalData.CurrentFirstMortgageHolderType = (short) MISMO.Enums.MortgageHolderType.FRE; break; } case "03": { this.AdditionalCaseData.TransmittalData.CurrentFirstMortgageHolderType = (short) MISMO.Enums.MortgageHolderType.Other; break; } case "F1": { this.AdditionalCaseData.TransmittalData.CurrentFirstMortgageHolderType = (short) MISMO.Enums.MortgageHolderType.Unknown; break; } } } tempval = du.ExtractData("99B", 7, 15); if (tempval != string.Empty) { if (_additionalcasedata == null) _additionalcasedata = new AUS.AdditionalCaseData(); if (_additionalcasedata._transmitdata == null) _additionalcasedata._transmitdata = new BusinessObjects.TransmittalData(); this.AdditionalCaseData.TransmittalData.PropertyAppraisedValueAmount = Convert.ToDecimal(tempval); } #endregion ADDITIONAL_CASE_DATA.TRANSMITTAL_DATA #region LOAN_PURPOSE tempval = du.ExtractData("02B", 89, 60); if (tempval != string.Empty) { if (_purpose == null) _purpose = new AUS.LoanPurpose(); this.Purpose.GSETitleMannerHeldDescription = tempval; } tempval = du.ExtractData("02B", 6, 2); if (tempval != string.Empty) { if (_purpose == null) _purpose = new AUS.LoanPurpose(); switch(tempval) { case "04": { this.Purpose.Type = (short) MISMO.Enums.LoanPurposeType.ConstructionOnly; break; } case "05": { this.Purpose.Type = (short) MISMO.Enums.LoanPurposeType.Refinance; break; } case "13": { this.Purpose.Type = (short) MISMO.Enums.LoanPurposeType.ConstructionToPermanent; break; } case "15": { this.Purpose.Type = (short) MISMO.Enums.LoanPurposeType.Other; break; } case "16": { this.Purpose.Type = (short) MISMO.Enums.LoanPurposeType.Purchase; break; } } } tempval = du.ExtractData("02B", 8, 80); if (tempval != string.Empty) { if (_purpose == null) _purpose = new AUS.LoanPurpose(); this.Purpose.OtherLoanPurposeDescription = tempval; } tempval = du.ExtractData("02B", 150, 8); if (tempval != string.Empty) { if (_purpose == null) _purpose = new AUS.LoanPurpose(); this.Purpose.PropertyLeaseholdExpirationDate = du.ToDate(tempval); } tempval = du.ExtractData("02B", 149, 1); if (tempval != string.Empty) { if (_purpose == null) _purpose = new AUS.LoanPurpose(); switch(tempval) { case "1": { this.Purpose.PropertyRightsType = (short) MISMO.Enums.PropertyRightsType.FeeSimple; break; } case "2": { this.Purpose.PropertyRightsType = (short) MISMO.Enums.PropertyRightsType.Leasehold; break; } } } tempval = du.ExtractData("02B", 88, 1); if (tempval != string.Empty) { if (_purpose == null) _purpose = new AUS.LoanPurpose(); switch(tempval) { case "1": { this.Purpose.PropertyUsageType = (short) MISMO.Enums.PropertyUsageType.PrimaryResidence; break; } case "2": { this.Purpose.PropertyUsageType = (short) MISMO.Enums.PropertyUsageType.SecondHome; break; } case "D": { this.Purpose.PropertyUsageType = (short) MISMO.Enums.PropertyUsageType.Investor; break; } } } #endregion LOAN_PURPOSE #region LOAN_PURPOSE.CONSTRUCTION_REFINANCE_DATA // load up the construction refi data tempval = du.ExtractData("02D", 53, 15); if (tempval != string.Empty) { if (_purpose == null) _purpose = new AUS.LoanPurpose(); if (_purpose._consrefidata == null) _purpose._consrefidata = new BusinessObjects.ConstructionRefinanceData(); this.Purpose.ConstructionRefinanceData.ConstructionImprovementCostsAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("02D", 68, 2); if (tempval != string.Empty) { if (_purpose == null) _purpose = new AUS.LoanPurpose(); if (_purpose._consrefidata == null) _purpose._consrefidata = new BusinessObjects.ConstructionRefinanceData(); switch(tempval) { case "F1": { this.Purpose.ConstructionRefinanceData.GSERefinancePurposeType = (short) MISMO.Enums.GSERefinancePurposeType.NoCashOutOther; break; } case "01": { this.Purpose.ConstructionRefinanceData.GSERefinancePurposeType = (short) MISMO.Enums.GSERefinancePurposeType.CashOutOther; break; } case "04": { this.Purpose.ConstructionRefinanceData.GSERefinancePurposeType = (short) MISMO.Enums.GSERefinancePurposeType.CashOutHomeImprovement; break; } case "11": { this.Purpose.ConstructionRefinanceData.GSERefinancePurposeType = (short) MISMO.Enums.GSERefinancePurposeType.CashOutDebtConsolidation; break; } case "13": { this.Purpose.ConstructionRefinanceData.GSERefinancePurposeType = (short) MISMO.Enums.GSERefinancePurposeType.CashOutLimited; break; } } } tempval = du.ExtractData("02D", 38, 15); if (tempval != string.Empty) { if (_purpose == null) _purpose = new AUS.LoanPurpose(); if (_purpose._consrefidata == null) _purpose._consrefidata = new BusinessObjects.ConstructionRefinanceData(); this.Purpose.ConstructionRefinanceData.LandEstimatedValueAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("02D", 8, 15); if (tempval != string.Empty) { if (_purpose == null) _purpose = new AUS.LoanPurpose(); if (_purpose._consrefidata == null) _purpose._consrefidata = new BusinessObjects.ConstructionRefinanceData(); this.Purpose.ConstructionRefinanceData.LandOriginalCostAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("02D", 4, 4); if (tempval != string.Empty) { if (_purpose == null) _purpose = new AUS.LoanPurpose(); if (_purpose._consrefidata == null) _purpose._consrefidata = new BusinessObjects.ConstructionRefinanceData(); this.Purpose.ConstructionRefinanceData.PropertyAcquiredYear = du.ToDate(tempval); } tempval = du.ExtractData("02D", 23, 15); if (tempval != string.Empty) { if (_purpose == null) _purpose = new AUS.LoanPurpose(); if (_purpose._consrefidata == null) _purpose._consrefidata = new BusinessObjects.ConstructionRefinanceData(); this.Purpose.ConstructionRefinanceData.PropertyExistingLienAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("02D", 8, 15); if (tempval != string.Empty) { if (_purpose == null) _purpose = new AUS.LoanPurpose(); if (_purpose._consrefidata == null) _purpose._consrefidata = new BusinessObjects.ConstructionRefinanceData(); this.Purpose.ConstructionRefinanceData.PropertyOriginalCostAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("02D", 151, 15); if (tempval != string.Empty) { if (_purpose == null) _purpose = new AUS.LoanPurpose(); if (_purpose._consrefidata == null) _purpose._consrefidata = new BusinessObjects.ConstructionRefinanceData(); this.Purpose.ConstructionRefinanceData.RefinanceImprovementCostsAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("02D", 151, 15); if (tempval != string.Empty) { if (_purpose == null) _purpose = new AUS.LoanPurpose(); if (_purpose._consrefidata == null) _purpose._consrefidata = new BusinessObjects.ConstructionRefinanceData(); switch(tempval) { case "Y": { this.Purpose.ConstructionRefinanceData.RefinanceImprovementsType = (short) MISMO.Enums.RefinanceImprovementsType.Made; break; } case "N": { this.Purpose.ConstructionRefinanceData.RefinanceImprovementsType = (short) MISMO.Enums.RefinanceImprovementsType.ToBeMade; break; } case "U": { this.Purpose.ConstructionRefinanceData.RefinanceImprovementsType = (short) MISMO.Enums.RefinanceImprovementsType.Unknown; break; } } } tempval = du.ExtractData("02D", 70, 80); if (tempval != string.Empty) { if (_purpose == null) _purpose = new AUS.LoanPurpose(); if (_purpose._consrefidata == null) _purpose._consrefidata = new BusinessObjects.ConstructionRefinanceData(); this.Purpose.ConstructionRefinanceData.RefinanceProposedImprovementsDescription = tempval; } #endregion LOAN_PURPOSE.CONSTRUCTION_REFINANCE_DATA #region LOAN_PRODUCT_DATA.LOAN_FEATURES // load the product data tempval = du.ExtractData("PCH", 7, 1); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); this.ProductData.LoanFeatures.AssumabilityIndicator = (tempval == "Y"); } tempval = du.ExtractData("LNC", 25, 1); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); this.ProductData.LoanFeatures.BalloonIndicator = (tempval == "Y"); } tempval = du.ExtractData("PCH", 4, 3); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); this.ProductData.LoanFeatures.BalloonLoanMaturityTermMonths = Convert.ToDecimal(tempval); } tempval = du.ExtractData("LNC", 28, 1); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); this.ProductData.LoanFeatures.CounselingConfirmationIndicator = (tempval == "Y"); } // TODO: DownPaymentOptionType?? // tempval = du.ExtractData("LNC", 28, 1); // if (tempval != string.Empty) // { // if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); // if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeature(); // switch(tempval) // { // case "": // { // this.ProductData.LoanFeatures.d = (tempval == "Y"); // break; // } // } // } tempval = du.ExtractData("LNC", 58, 1); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); this.ProductData.LoanFeatures.EscrowWaiverIndicator = (tempval == "Y"); } tempval = du.ExtractData("LNC", 6, 2); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); switch(tempval) { case "01": { this.ProductData.LoanFeatures.GSEPropertyType = (short) MISMO.Enums.GSEPropertyType.Detached; break; } case "02": { this.ProductData.LoanFeatures.GSEPropertyType = (short) MISMO.Enums.GSEPropertyType.Attached; break; } case "03": { this.ProductData.LoanFeatures.GSEPropertyType = (short) MISMO.Enums.GSEPropertyType.Condominium; break; } case "04": { this.ProductData.LoanFeatures.GSEPropertyType = (short) MISMO.Enums.GSEPropertyType.PUD; break; } case "05": { this.ProductData.LoanFeatures.GSEPropertyType = (short) MISMO.Enums.GSEPropertyType.Cooperative; break; } case "07": { this.ProductData.LoanFeatures.GSEPropertyType = (short) MISMO.Enums.GSEPropertyType.HighRiseCondominium; break; } case "08": { this.ProductData.LoanFeatures.GSEPropertyType = (short) MISMO.Enums.GSEPropertyType.ManufacturedHousing; break; } case "09": { this.ProductData.LoanFeatures.GSEPropertyType = (short) MISMO.Enums.GSEPropertyType.DetachedCondominium; break; } case "10": { this.ProductData.LoanFeatures.GSEPropertyType = (short) MISMO.Enums.GSEPropertyType.ManufacturedHomeCondominiumOrPUDOrCooperative; break; } } } tempval = du.ExtractData("LNC", 4, 1); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); switch(tempval) { case "1": { this.ProductData.LoanFeatures.LienPriorityType = (short) MISMO.Enums.LienPriorityType.FirstLien; break; } case "2": { this.ProductData.LoanFeatures.LienPriorityType = (short) MISMO.Enums.LienPriorityType.SecondLien; break; } case "F": { this.ProductData.LoanFeatures.LienPriorityType = (short) MISMO.Enums.LienPriorityType.Other; break; } } } tempval = du.ExtractData("LNC", 5, 1); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); switch(tempval) { case "A": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.Alternative; break; } case "F": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.FullDocumentation; break; } case "R": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.Reduced; break; } case "B": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.StreamlineRefinance; break; } case "C": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.NoDocumentation; break; } case "D": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.NoRatio; break; } // TODO try to verify mapping??? // case "E": // { // this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.; // break; // } case "U": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.NoIncomeNoEmploymentNoAssetsOn1003; break; } // case "G": // { // this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.no; // break; // } case "J": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.NoIncomeOn1003; break; } case "K": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.NoVerificationOfStatedIncomeEmploymentOrAssets; break; } case "L": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.NoVerificationOfStatedIncomeOrAssests; break; } case "M": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.NoVerificationOfStatedAssets; break; } case "N": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.NoVerificationOfStatedIncomeOrEmployment; break; } case "O": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.NoVerificationOfStatedIncome; break; } case "P": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.VerbalVerificationOfEmployment; break; } case "Q": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.OnePaystub; break; } case "S": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.OnePaystubAndVerbalVerificationOfEmployment; break; } case "T": { this.ProductData.LoanFeatures.LoanDocumentationType = (short) MISMO.Enums.LoanDocumentationType.OnePaystubAndOneW2AndVerbalVerificationOfEmploymentOrOneYear1040; break; } } } // end of loan documentation type tempval = du.ExtractData("PCH", 12, 2); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); switch(tempval) { case "N": { this.ProductData.LoanFeatures.LoanRepaymentType = (short) MISMO.Enums.LoanRepaymentType.NoNegativeAmortization; break; } case "F1": { this.ProductData.LoanFeatures.LoanRepaymentType = (short) MISMO.Enums.LoanRepaymentType.ScheduledAmortization; break; } case "F2": { this.ProductData.LoanFeatures.LoanRepaymentType = (short) MISMO.Enums.LoanRepaymentType.InterestOnly; break; } case "P": { this.ProductData.LoanFeatures.LoanRepaymentType = (short) MISMO.Enums.LoanRepaymentType.PotentialNegativeAmortization; break; } case "S": { this.ProductData.LoanFeatures.LoanRepaymentType = (short) MISMO.Enums.LoanRepaymentType.ScheduledNegativeAmortization; break; } } } tempval = du.ExtractData("LNC", 59, 8); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); this.ProductData.LoanFeatures.LoanScheduledClosingDate = du.ToDate(tempval); } tempval = du.ExtractData("LNC", 75, 7); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); this.ProductData.LoanFeatures.MICoveragePercent = Convert.ToDecimal(tempval); } tempval = du.ExtractData("LNC", 82, 3); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); switch(tempval) { case "001": { this.ProductData.LoanFeatures.MICompanyNameType = (short) MISMO.Enums.MICompanyNameType.GECapitalMICorporation; break; } case "006": { this.ProductData.LoanFeatures.MICompanyNameType = (short) MISMO.Enums.MICompanyNameType.MortgageGuarantyInsuranceCorporation; break; } case "011": { this.ProductData.LoanFeatures.MICompanyNameType = (short) MISMO.Enums.MICompanyNameType.PMI_MICorporation; break; } case "012": { this.ProductData.LoanFeatures.MICompanyNameType = (short) MISMO.Enums.MICompanyNameType.UnitedGuarantyCorporation; break; } case "013": { this.ProductData.LoanFeatures.MICompanyNameType = (short) MISMO.Enums.MICompanyNameType.RepublicMICompany; break; } case "017": { this.ProductData.LoanFeatures.MICompanyNameType = (short) MISMO.Enums.MICompanyNameType.RadianGuarantyIncorporated; break; } case "024": { this.ProductData.LoanFeatures.MICompanyNameType = (short) MISMO.Enums.MICompanyNameType.TriadGuarantyInsuranceCorporation; break; } case "038": { this.ProductData.LoanFeatures.MICompanyNameType = (short) MISMO.Enums.MICompanyNameType.CMG_MICompany; break; } } } tempval = du.ExtractData("LNC", 18, 7); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); this.ProductData.LoanFeatures.NegativeAmortizationLimitPercent = Convert.ToDecimal(tempval); } tempval = du.ExtractData("PCH", 8, 2); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); switch(tempval) { case "01": { this.ProductData.LoanFeatures.PaymentFrequencyType = (short) MISMO.Enums.PaymentFrequencyType.Monthly; break; } case "02": { this.ProductData.LoanFeatures.PaymentFrequencyType = (short) MISMO.Enums.PaymentFrequencyType.Biweekly; break; } } } tempval = du.ExtractData("PCH", 10, 1); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); this.ProductData.LoanFeatures.PrepaymentPenaltyIndicator = (tempval == "Y"); } tempval = du.ExtractData("PCH", 11, 1); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); this.ProductData.LoanFeatures.PrepaymentRestrictionIndicator = (tempval == "Y"); } tempval = du.ExtractData("PID", 4, 30); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); this.ProductData.LoanFeatures.ProductDescription = tempval; } tempval = du.ExtractData("PID", 34, 15); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); this.ProductData.LoanFeatures.ProductName = tempval; } tempval = du.ExtractData("LNC", 67, 8); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._loanfeatures == null) _loanproductdata._loanfeatures = new BusinessObjects.LoanFeatures(); this.ProductData.LoanFeatures.ScheduledFirstPaymentDate = du.ToDate(tempval); } #endregion LOAN_PRODUCT_DATA.LOAN_FEATURES #region TRANSACTION_DETAIL tempval = du.ExtractData("07A", 19, 15); if (tempval != string.Empty) { if (_transdetail == null) _transdetail = new AUS.TransactionDetail(); this.TransactionDetail.AlterationsImprovementsAndRepairsAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("07A", 109, 15); if (tempval != string.Empty) { if (_transdetail == null) _transdetail = new AUS.TransactionDetail(); this.TransactionDetail.BorrowerPaidDiscountPointsTotalAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("07A", 79, 15); if (tempval != string.Empty) { if (_transdetail == null) _transdetail = new AUS.TransactionDetail(); this.TransactionDetail.EstimatedClosingCostsAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("07A", 154, 15); if (tempval != string.Empty) { if (_transdetail == null) _transdetail = new AUS.TransactionDetail(); this.TransactionDetail.MIAndFundingFeeFinancedAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("07A", 94, 15); if (tempval != string.Empty) { if (_transdetail == null) _transdetail = new AUS.TransactionDetail(); this.TransactionDetail.MIAndFundingFeeTotalAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("07A", 64, 15); if (tempval != string.Empty) { if (_transdetail == null) _transdetail = new AUS.TransactionDetail(); this.TransactionDetail.PrepaidItemsEstimatedAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("07A", 4, 15); if (tempval != string.Empty) { if (_transdetail == null) _transdetail = new AUS.TransactionDetail(); this.TransactionDetail.PurchasePriceAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("07A", 49, 15); if (tempval != string.Empty) { if (_transdetail == null) _transdetail = new AUS.TransactionDetail(); this.TransactionDetail.RefinanceIncludingDebtsToBePaidOffAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("GOA", 20, 15); if (tempval != string.Empty) { if (_transdetail == null) _transdetail = new AUS.TransactionDetail(); this.TransactionDetail.SalesConcessionAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("07A", 139, 15); if (tempval != string.Empty) { if (_transdetail == null) _transdetail = new AUS.TransactionDetail(); this.TransactionDetail.SellerPaidClosingCostsAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("07A", 124, 15); if (tempval != string.Empty) { if (_transdetail == null) _transdetail = new AUS.TransactionDetail(); this.TransactionDetail.SubordinateLienAmount = Convert.ToDecimal(tempval); } #endregion TRANSACTION_DETAIL #region LOAN_PRODUCT_DATA.ARM tempval = du.ExtractData("ARM", 4, 7); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._arm == null) _loanproductdata._arm = new BusinessObjects.ARM(); this.ProductData.ARM.IndexCurrentValuePercent = Convert.ToDecimal(tempval) / 100; } tempval = du.ExtractData("ARM", 13, 7); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._arm == null) _loanproductdata._arm = new BusinessObjects.ARM(); this.ProductData.ARM.IndexMarginPercent = Convert.ToDecimal(tempval) / 100; } tempval = du.ExtractData("ARM", 11, 2); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._arm == null) _loanproductdata._arm = new BusinessObjects.ARM(); switch(tempval) { case "0": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.WeeklyAverageConstantMaturingTreasury; break; } case "1": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.MonthlyAverageConstantMaturingTreasury; break; } case "2": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.WeeklyAverageTreasuryAuctionAverageInvestmentYield; break; } case "3": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.WeeklyAverageTreasuryAuctionAverageBondDiscountYield; break; } case "4": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.WeeklyAverageSecondaryMarketTreasuryBillInvestmentYield; break; } case "5": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.DailyCertificateOfDepositRate; break; } case "6": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.WeeklyAverageCertificateOfDepositRate; break; } case "7": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.WeeklyAveragePrimeRate; break; } case "8": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.TreasuryBillDailyValue; break; } case "9": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.EleventhDistrictCostOfFunds; break; } case "10": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.NationalMonthlyMedianCostOfFunds; break; } case "11": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.WallStreetJournalLIBOR; break; } case "12": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.FNM_LIBOR; break; } case "13": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.FRE_LIBOR; break; } case "14": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.NationalAverageContractRateFHLBB; break; } case "15": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.FederalCostOfFunds; break; } case "16": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.FNM60DayRequiredNetYield; break; } case "17": { _loanproductdata._arm.IndexType = (short) MISMO.Enums.ARMIndexType.FRE60DayRequiredNetYield; break; } } } tempval = du.ExtractData("ARM", 20, 7); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._arm == null) _loanproductdata._arm = new BusinessObjects.ARM(); this.ProductData.ARM.QualifyingRatePercent = Convert.ToDecimal(tempval) / 100; } tempval = du.ExtractData("LNC", 43, 15); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._arm == null) _loanproductdata._arm = new BusinessObjects.ARM(); this.ProductData.ARM.PaymentAdjustmentLifetimeCapAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractData("LNC", 36, 7); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._arm == null) _loanproductdata._arm = new BusinessObjects.ARM(); this.ProductData.ARM.PaymentAdjustmentLifetimeCapPercent = Convert.ToDecimal(tempval) / 100; } tempval = du.ExtractData("LNC", 29, 7); if (tempval != string.Empty) { if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); if (_loanproductdata._arm == null) _loanproductdata._arm = new BusinessObjects.ARM(); this.ProductData.ARM.RateAdjustmentLifetimeCapPercent = Convert.ToDecimal(tempval) / 100; } #endregion LOAN_PRODUCT_DATA.ARM #region LOAN_PRODUCT_DATA.RATE_ADJUSTMENT int rateadjustmentcount = du.BeginCapture("RAJ"); if (rateadjustmentcount > 0) { MISMO.BusinessObjects.RateAdjustment raj = null; if (_loanproductdata == null) _loanproductdata = new AUS.LoanProductData(); for(int i = 0; i<rateadjustmentcount; i++) { raj = new BusinessObjects.RateAdjustment(); tempval = du.ExtractCaptureData(i, 29, 3); if (tempval != string.Empty) raj.FirstRateAdjustmentMonths = Convert.ToDecimal(tempval); tempval = du.ExtractCaptureData(i, 14, 1); switch(tempval) { case "0": { raj.CalculationType = (short) MISMO.Enums.RateAdjustmentCalculationType.AddPercentToCurrentRate; break; } case "1": { raj.CalculationType = (short) MISMO.Enums.RateAdjustmentCalculationType.AddPercentToOriginalRate; break; } case "2": { raj.CalculationType = (short) MISMO.Enums.RateAdjustmentCalculationType.IndexPlusMargin; break; } } tempval = du.ExtractCaptureData(i, 8, 3); if (tempval != string.Empty) raj.DurationMonths = Convert.ToDecimal(tempval); tempval = du.ExtractCaptureData(i, 15, 7); if (tempval != string.Empty) raj.Percent = Convert.ToDecimal(tempval) / 100; tempval = du.ExtractCaptureData(i, 4, 4); if (tempval != string.Empty) raj.PeriodNumber = Convert.ToDecimal(tempval); tempval = du.ExtractCaptureData(i, 22, 7); if (tempval != string.Empty) raj.SubsequentCapPercent = Convert.ToDecimal(tempval) / 100; tempval = du.ExtractCaptureData(i, 11, 3); if (tempval != string.Empty) raj.SubsequentRateAdjustmentMonths = Convert.ToDecimal(tempval); if (raj.CalculationType != (short) Enums.RateAdjustmentCalculationType.Undefined) _loanproductdata._rateadjustments.Add(raj); } } du.EndCapture(); #endregion LOAN_PRODUCT_DATA.RATE_ADJUSTMENT #region PROPOSED_HOUSING_EXPENSE int propsedexpcount = du.BeginCapture("05H"); if (propsedexpcount > 0) { MISMO.BusinessObjects.ProposedHousingExpense propexp = null; for(int i = 0; i<propsedexpcount; i++) { propexp = new BusinessObjects.ProposedHousingExpense(); tempval = du.ExtractCaptureData(i, 14, 2); switch(tempval) { case "25": { propexp.HousingExpenseType = (short) MISMO.Enums.HousingExpenseType.GroundRent; break; } case "26": { propexp.HousingExpenseType = (short) MISMO.Enums.HousingExpenseType.FirstMortgagePrincipalAndInterest; break; } case "22": { propexp.HousingExpenseType = (short) MISMO.Enums.HousingExpenseType.OtherMortgageLoanPrincipalAndInterest; break; } case "01": { propexp.HousingExpenseType = (short) MISMO.Enums.HousingExpenseType.HazardInsurance; break; } case "14": { propexp.HousingExpenseType = (short) MISMO.Enums.HousingExpenseType.RealEstateTax; break; } case "02": { propexp.HousingExpenseType = (short) MISMO.Enums.HousingExpenseType.MI; break; } case "06": { propexp.HousingExpenseType = (short) MISMO.Enums.HousingExpenseType.HomeownersAssociationDuesAndCondominiumFees; break; } case "23": { propexp.HousingExpenseType = (short) MISMO.Enums.HousingExpenseType.OtherHousingExpense; break; } } tempval = du.ExtractCaptureData(i, 16, 15); if (tempval != string.Empty) propexp.PaymentAmount = Convert.ToDecimal(tempval); this.ProposedHousingExpenses.Add(propexp); } } #endregion PROPOSED_HOUSING_EXPENSE #region BORROWER (nested elements) // iterate through all the borrowers and extract their respective data for(int i = 0, j= _borrowers.Count; i<j; i++) { MISMO.BusinessObjects.AUS.Borrower cborrower = _borrowers[i] as AUS.Borrower; #region BORROWER.CURRENT_INCOME int cincomecount = du.BeginCapture("05I", 4, 9, cborrower.SSN); MISMO.BusinessObjects.CurrentIncome cincome = null; if (cincomecount > 0) { for(int k = 0; k<cincomecount; k++) { cincome = new BusinessObjects.CurrentIncome(); tempval = du.ExtractCaptureData(k, 13, 2); switch(tempval) { case "F1": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.MilitaryBasePay; break; } case "07": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.MilitaryRationsAllowance; break; } case "F2": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.MilitaryFlightPay; break; } case "F3": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.MilitaryHazardPay; break; } case "02": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.MilitaryClothesAllowance; break; } case "04": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.MilitaryQuartersAllowance; break; } case "03": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.MilitaryPropPay; break; } case "F4": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.MilitaryOverseasPay; break; } case "F5": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.MilitaryCombatPay; break; } case "F6": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.MilitaryVariableHousingAllowance; break; } case "F7": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.AlimonyChildSupport; break; } case "F8": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.NotesReceivableInstallment; break; } case "41": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.Pension; break; } case "42": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.SocialSecurity; break; } case "30": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.MortgageDifferential; break; } case "F9": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.Trust; break; } case "M1": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.Unemployment; break; } case "M2": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.AutomobileExpenseAccount; break; } case "M3": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.FosterCare; break; } case "M4": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.VABenefitsNonEducational; break; } case "45": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.OtherTypesOfIncome; break; } case "20": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.Base; break; } case "09": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.Overtime; break; } case "08": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.Bonus; break; } case "10": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.Commissions; break; } case "17": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.DividendsInterest; break; } case "SI": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.SubjectPropertyNetCashFlow; break; } case "33": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.NetRentalIncome; break; } case "BI": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.OtherTypesOfIncome; break; } case "MC": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.OtherTypesOfIncome; break; } case "TC": { cincome.IncomeType = (short) MISMO.Enums.IncomeType.OtherTypesOfIncome; break; } } tempval = du.ExtractCaptureData(k, 15, 15); if (tempval != string.Empty) cincome.MonthlyTotalAmount = Convert.ToDecimal(tempval); cborrower.CurrentIncomes.Add(cincome); } } #endregion BORROWER.CURRENT_INCOME #region BORROWER.DECLARATION int brwdeclcount = du.BeginCapture("08A", 4, 9, cborrower.SSN); if (brwdeclcount > 0) { // first create an instance of the declaration. if (cborrower.Declaration == null) cborrower.Declaration = new AUS.Declaration(); tempval = du.ExtractCaptureData(0, 19, 1); if (tempval != string.Empty) cborrower.Declaration.AlimonyChildSupportObligationIndicator = (tempval == "Y"); tempval = du.ExtractCaptureData(0, 14, 1); if (tempval != string.Empty) cborrower.Declaration.BankruptcyIndicator = (tempval == "Y"); tempval = du.ExtractCaptureData(0, 20, 1); if (tempval != string.Empty) cborrower.Declaration.BorrowedDownPaymentIndicator = (tempval == "Y"); tempval = du.ExtractCaptureData(0, 22, 2); switch(tempval) { case "01": { cborrower.Declaration.CitizenshipResidencyType = (short) MISMO.Enums.CitizenshipResidencyType.USCitizen; break; } case "03": { cborrower.Declaration.CitizenshipResidencyType = (short) MISMO.Enums.CitizenshipResidencyType.PermanentResidentAlien; break; } case "05": { cborrower.Declaration.CitizenshipResidencyType = (short) MISMO.Enums.CitizenshipResidencyType.NonPermanentResidentAlien; break; } } tempval = du.ExtractCaptureData(0, 21, 1); if (tempval != string.Empty) cborrower.Declaration.CoMakerEndorserOfNoteIndicator = (tempval == "Y"); tempval = du.ExtractCaptureData(0, 25, 1); if (tempval != string.Empty && (tempval == "Y" || tempval == "N")) cborrower.Declaration.HomeownerPastThreeYearsType = (tempval == "Y"); tempval = du.ExtractCaptureData(0, 24, 1); if (tempval != string.Empty && (tempval == "Y" || tempval == "N")) cborrower.Declaration.IntentToOccupyType = (tempval == "Y"); tempval = du.ExtractCaptureData(0, 17, 1); if (tempval != string.Empty) cborrower.Declaration.LoanForeclosureOrJudgementIndicator = (tempval == "Y"); tempval = du.ExtractCaptureData(0, 13, 1); if (tempval != string.Empty) cborrower.Declaration.OutstandingJudgementsIndicator = (tempval == "Y"); tempval = du.ExtractCaptureData(0, 16, 1); if (tempval != string.Empty) cborrower.Declaration.PartyToLawsuitIndicator = (tempval == "Y"); tempval = du.ExtractCaptureData(0, 18, 1); if (tempval != string.Empty) cborrower.Declaration.PresentlyDelinquentIndicator = (tempval == "Y"); tempval = du.ExtractCaptureData(0, 27, 2); switch(tempval) { case "01": { cborrower.Declaration.PriorPropertyTitleType = (short) MISMO.Enums.PriorPropertyTitleType.Sole; break; } case "25": { cborrower.Declaration.PriorPropertyTitleType = (short) MISMO.Enums.PriorPropertyTitleType.JointWithSpouse; break; } case "26": { cborrower.Declaration.PriorPropertyTitleType = (short) MISMO.Enums.PriorPropertyTitleType.JointWithOtherThanSpouse; break; } } tempval = du.ExtractCaptureData(0, 26, 1); switch(tempval) { case "1": { cborrower.Declaration.PriorPropertyUsageType = (short) MISMO.Enums.PriorPropertyUsageType.PrimaryResidence; break; } case "2": { cborrower.Declaration.PriorPropertyUsageType = (short) MISMO.Enums.PriorPropertyUsageType.SecondaryResidence; break; } case "D": { cborrower.Declaration.PriorPropertyUsageType = (short) MISMO.Enums.PriorPropertyUsageType.Investment; break; } } tempval = du.ExtractCaptureData(0, 15, 1); if (tempval != string.Empty) cborrower.Declaration.PropertyForeclosedPastSevenYearsIndicator = (tempval == "Y"); du.EndCapture(); #region BORROWER.DECLARATION._EXPLANATION int explanationcount = du.BeginCapture("08B", 4, 9, cborrower.SSN); if (explanationcount > 0) { MISMO.BusinessObjects.Explanation expl = null; for(int l = 0; l<explanationcount; l++) { expl = new MISMO.BusinessObjects.Explanation(); tempval = du.ExtractCaptureData(l, 15, 255); if (tempval != string.Empty) { expl.Description = tempval; } tempval = du.ExtractCaptureData(l, 13, 2); switch(tempval) { case "91": { expl.Type = (short) MISMO.Enums.ExplanationType.OutstandingJudgments; break; } case "92": { expl.Type = (short) MISMO.Enums.ExplanationType.DeclaredBankruptcyPastSevenYears; break; } case "93": { expl.Type = (short) MISMO.Enums.ExplanationType.DirectIndirectForeclosedPropertyPastSevenYears; break; } case "94": { expl.Type = (short) MISMO.Enums.ExplanationType.PartyToLawsuit; break; } case "95": { expl.Type = (short) MISMO.Enums.ExplanationType.ObligatedOnLoanForeclosedOrDeedInLieuOfJudgement; break; } case "96": { expl.Type = (short) MISMO.Enums.ExplanationType.DelinquencyOrDefault; break; } case "97": { expl.Type = (short) MISMO.Enums.ExplanationType.AlimonyChildSupport; break; } case "98": { expl.Type = (short) MISMO.Enums.ExplanationType.BorrowedDownPayment; break; } case "99": { expl.Type = (short) MISMO.Enums.ExplanationType.CoMakerEndorserOnNote; break; } } cborrower.Declaration.Explanations.Add(expl); } } #endregion BORROWER.DECLARATION._EXPLANATION } #endregion BORROWER.DECLARATION #region ASSETS AUS.Asset assobj = null; // load standard assets int asscount = du.BeginCapture("06C", 4, 9, cborrower.SSN); if (asscount > 0) { for(int n = 0; n<asscount; n++) { assobj = new AUS.Asset(); // first extract or try to determine the asset type tempval = du.ExtractCaptureData(n, 13, 3); switch(tempval) { case "03": { assobj.Type = (short) MISMO.Enums.AssetType.CheckingAccount; break; } case "F1": { assobj.Type = (short) MISMO.Enums.AssetType.SaleOtherAssets; break; } case "SG": { assobj.Type = (short) MISMO.Enums.AssetType.SavingsAccount; break; } case "F2": { assobj.Type = (short) MISMO.Enums.AssetType.GiftsTotal; break; } case "01": { assobj.Type = (short) MISMO.Enums.AssetType.CertificateOfDepositTimeDeposit; break; } case "F3": { assobj.Type = (short) MISMO.Enums.AssetType.MoneyMarketFund; break; } case "F4": { assobj.Type = (short) MISMO.Enums.AssetType.MutualFund; break; } case "05": { assobj.Type = (short) MISMO.Enums.AssetType.Stock; break; } case "06": { assobj.Type = (short) MISMO.Enums.AssetType.Bond; break; } case "F5": { assobj.Type = (short) MISMO.Enums.AssetType.SecuredBorrowedFundsNotDeposited; break; } case "F7": { assobj.Type = (short) MISMO.Enums.AssetType.BridgeLoanNotDeposited; break; } case "08": { assobj.Type = (short) MISMO.Enums.AssetType.RetirementFund; break; } case "F8": { assobj.Type = (short) MISMO.Enums.AssetType.NetWorthOfBusinessOwned; break; } case "11": { assobj.Type = (short) MISMO.Enums.AssetType.TrustAccount; break; } case "M1": { assobj.Type = (short) MISMO.Enums.AssetType.OtherNonLiquidAssets; break; } case "OL": { assobj.Type = (short) MISMO.Enums.AssetType.OtherLiquidAssets; break; } case "NE": { assobj.Type = (short) MISMO.Enums.AssetType.PendingNetSaleProceedsFromRealEstateAssets; break; } case "COH": { assobj.Type = (short) MISMO.Enums.AssetType.CashOnHand; break; } case "GE": { assobj.Type = (short) MISMO.Enums.AssetType.GiftsNotDeposited; break; } } tempval = du.ExtractCaptureData(n, 132, 30); if (tempval != string.Empty) { assobj.AccountIdentifier = tempval; } tempval = du.ExtractCaptureData(n, 162, 15); if (tempval != string.Empty) { assobj.CashOrMarketValueAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractCaptureData(n, 16, 35); if (tempval != string.Empty) { assobj.HolderName = tempval; } tempval = du.ExtractCaptureData(n, 51, 35); if (tempval != string.Empty) { assobj.HolderStreetAddress = tempval; } tempval = du.ExtractCaptureData(n, 86, 35); if (tempval != string.Empty) { assobj.HolderCity = tempval; } tempval = du.ExtractCaptureData(n, 121, 2); if (tempval != string.Empty) { assobj.HolderState = tempval; } tempval = du.ExtractCaptureData(n, 123, 5); if (tempval != string.Empty) { assobj.HolderPostalCode = tempval; } tempval = du.ExtractCaptureData(n, 128, 4); if (tempval != string.Empty) { assobj.HolderPostalCode += "-" + tempval; } tempval = du.ExtractCaptureData(n, 184, 80); if (tempval != string.Empty) { assobj.OtherAssetTypeDescription = tempval; } tempval = du.ExtractCaptureData(n, 177, 7); if (tempval != string.Empty) { assobj.StockBondMutualFundShareCount = Convert.ToDecimal(tempval); } // add the asset to the borrower cborrower.Assets.Add(assobj); } } // load life insurance assets asscount = du.BeginCapture("06B", 4, 9, cborrower.SSN); if (asscount > 0) { for(int n = 0; n<asscount; n++) { assobj = new AUS.Asset(); assobj.Type = (short) MISMO.Enums.AssetType.LifeInsurance; tempval = du.ExtractCaptureData(n, 13, 30); if (tempval != string.Empty) { assobj.AccountIdentifier = tempval; } tempval = du.ExtractCaptureData(n, 43, 15); if (tempval != string.Empty) { assobj.CashOrMarketValueAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractCaptureData(n, 58, 15); if (tempval != string.Empty) { assobj.LifeInsuranceFaceValueAmount = Convert.ToDecimal(tempval); } } } // load cash deposits assets asscount = du.BeginCapture("06A", 4, 9, cborrower.SSN); if (asscount > 0) { for(int n = 0; n<asscount; n++) { assobj = new AUS.Asset(); assobj.Type = (short) MISMO.Enums.AssetType.EarnestMoneyCashDepositTowardPurchase; tempval = du.ExtractCaptureData(n, 48, 15); if (tempval != string.Empty) { assobj.CashOrMarketValueAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractCaptureData(n, 13, 35); if (tempval != string.Empty) { assobj.HolderName = tempval; } } } // load automobile assets asscount = du.BeginCapture("06D", 4, 9, cborrower.SSN); if (asscount > 0) { for(int n = 0; n<asscount; n++) { assobj = new AUS.Asset(); assobj.Type = (short) MISMO.Enums.AssetType.Automobile; tempval = du.ExtractCaptureData(n, 47, 15); if (tempval != string.Empty) { assobj.CashOrMarketValueAmount = Convert.ToDecimal(tempval); } tempval = du.ExtractCaptureData(n, 13, 30); if (tempval != string.Empty) { assobj.AutomobileMakeDescription = tempval; } tempval = du.ExtractCaptureData(n, 43, 4); if (tempval != string.Empty) { assobj.AutomobileModelYear = du.ToDate(tempval); } } } #endregion ASSETS } #endregion BORROWER (nested elements) }