private void backagain() { cancelchangesbtn.Location = new Point(856, 634); cancelchangesbtn.Height = 52; cancelchangesbtn.Font = new Font("serif", 15); Paymentbtn.Show(); confirmeditbtn.Hide(); editcustinfobtn.Show(); fnameprintlabel.Show(); mnameprintlabel.Show(); lnameprintlabel.Show(); homephonelabel.Show(); cellphonelabel.Show(); workphonelabel.Show(); addressline1data.Show(); addressline2data.Show(); citylabel.Show(); statelabel.Show(); makelabel.Show(); modellabel.Show(); yearlabel.Show(); colorlabel.Show(); VINlabel.Show(); Vehicleloclabel.Show(); vehiclecostdatalabel.Show(); fnameprinttxtbox.Hide(); mnameprinttxtbox.Hide(); lnameprinttxtbox.Hide(); homephonetxtbox.Hide(); textBox2.Hide(); textBox3.Hide(); addressline1datatxtbox.Hide(); addressline2datatxtbox.Hide(); citytxtbox.Hide(); statetxtbox.Hide(); maketxtbox.Hide(); modeltxtbox.Hide(); yeartxtbox.Hide(); colortxtbox.Hide(); VINtxtbox.Hide(); Vehicleloctxtbox.Hide(); }
private void ManageAccount_Load_1(object sender, EventArgs e) { string selectedfile = Main.selectedfile; if (Main.archivecheck == 1) { confirmeditbtn.Hide(); Paymentbtn.Hide(); editcustinfobtn.Hide(); } var plaintextbytes = System.Text.Encoding.UTF8.GetBytes(selectedfile); var finishbytes = System.Convert.ToBase64String(plaintextbytes); RetrieveClient client = new Trading_Post.RetrieveClient(finishbytes); fnameprintlabel.Text = RetrieveClient.fname; mnameprintlabel.Text = RetrieveClient.mname; lnameprintlabel.Text = RetrieveClient.lname; homephonelabel.Text = RetrieveClient.homephone; cellphonelabel.Text = RetrieveClient.cellphone; workphonelabel.Text = RetrieveClient.workphone; addressline1data.Text = RetrieveClient.addressline1; addressline2data.Text = RetrieveClient.addressline2; citylabel.Text = RetrieveClient.city; statelabel.Text = RetrieveClient.state; makelabel.Text = RetrieveClient.make; modellabel.Text = RetrieveClient.model; yearlabel.Text = RetrieveClient.year; colorlabel.Text = RetrieveClient.color; VINlabel.Text = RetrieveClient.vin; Vehicleloclabel.Text = RetrieveClient.location; vehiclecostdatalabel.Text = RetrieveClient.originalcost.ToString(); remainbal.Text = RetrieveClient.newtotal.ToString(); taxtot = RetrieveClient.taxtot; taxtype = RetrieveClient.taxtype; taxrate = RetrieveClient.taxrate; billdate = Convert.ToDateTime(RetrieveClient.billdate); interestratelabel.Text = RetrieveClient.interestrate.ToString(); storagefeelabel.Text = RetrieveClient.storagefee.ToString(); interestrate = RetrieveClient.interestrate; storagefee = RetrieveClient.storagefee; itemid = RetrieveClient.itemid; itemidlabel.Text = itemid; duedatelabel.Text = RetrieveClient.billdate.ToString("MM/dd/yyyy"); var plaintextbytes2 = System.Text.Encoding.UTF8.GetBytes(selectedfile); var finishbytes2 = System.Convert.ToBase64String(plaintextbytes2); Font font = new Font("Times New Roman", 11.0f, FontStyle.Bold); string activeDir2 = Main.activeDir + finishbytes2 + @"\note.txt"; paymenthistorytxtbox.Font = font; using (var reader = new StreamReader(activeDir2)) { while (!reader.EndOfStream) { var line = reader.ReadLine(); var values = line.Split('~'); if (line.Contains("Account Created")) { String headache = values[0].ToString(); Char delimiter = ','; String[] substrings = headache.Split(delimiter); List <string> templist = new List <string>(); foreach (var substring in substrings) { templist.Add(substring); } templist[2] = "$" + templist[2]; int count2 = 11 - templist[2].Length; if (count2 > 0) { templist[2] += new string('_', count2); } int count4 = 11 - templist[4].Length; if (count4 > 0) { templist[4] += new string('_', count4); } const string format = "{0,0} {1,13} {2,14}{3,27}{2,44}"; string test = string.Format(format, templist[0], templist[1], templist[2], templist[3], templist[2]); paymenthistorytxtbox.AppendText(test + "\n"); } if (line.Contains("(note)")) { String headache = values[0].ToString(); Char delimiter = ','; String[] substrings = headache.Split(delimiter); List <string> templist = new List <string>(); foreach (var substring in substrings) { templist.Add(substring); } if (templist[2].Length == 6) { paymenthistorytxtbox.AppendText(templist[0] + " " + templist[1] + " " + templist[3] + "\n"); } } if (line.Contains("Account Has Been Paid in Full.")) { String headache = values[0].ToString(); Char delimiter = ','; String[] substrings = headache.Split(delimiter); List <string> templist = new List <string>(); foreach (var substring in substrings) { templist.Add(substring); } paymenthistorytxtbox.AppendText(templist[0] + " " + templist[1] + " " + templist[2] + "\n"); } if (line.Contains("State Tax")) { String headache = values[0].ToString(); Char delimiter = ','; String[] substrings = headache.Split(delimiter); List <string> templist = new List <string>(); foreach (var substring in substrings) { templist.Add(substring); } templist[2] = "$" + templist[2]; templist[3] = templist[3] + "%"; templist[4] = "$" + templist[4]; templist[5] = "$" + templist[5]; int count2 = 11 - templist[2].Length; if (count2 > 0) { templist[2] += new string('_', count2); } int count4 = 11 - templist[4].Length; if (count4 > 0) { templist[4] += new string('_', count4); } int count5 = 11 - templist[5].Length; if (count5 > 0) { templist[5] = new string('_', count5) + templist[5]; } const string format = "{0,0} {1,13} {2,14}{3,27}{4,22}{5,14}"; string test = string.Format(format, templist[0], templist[1], templist[2], templist[3], templist[4], templist[5]); paymenthistorytxtbox.AppendText(test + "\n"); } if (line.Contains("State&County Tax")) { String headache = values[0].ToString(); Char delimiter = ','; String[] substrings = headache.Split(delimiter); List <string> templist = new List <string>(); foreach (var substring in substrings) { templist.Add(substring); } templist[2] = "$" + templist[2]; templist[3] = templist[3] + "%"; templist[4] = "$" + templist[4]; templist[5] = "$" + templist[5]; int count2 = 11 - templist[2].Length; if (count2 > 0) { templist[2] += new string('_', count2); } int count4 = 11 - templist[4].Length; if (count4 > 0) { templist[4] += new string('_', count4); } int count5 = 11 - templist[5].Length; if (count5 > 0) { templist[5] = new string('_', count5) + templist[5]; } const string format = "{0,0} {1,13} {2,14}{3,27}{4,13} {5,13}"; string test = string.Format(format, templist[0], templist[1], templist[2], templist[3], templist[4], templist[5]); paymenthistorytxtbox.AppendText(test + "\n"); } if (line.Contains("Storage Fee")) { String headache = values[0].ToString(); Char delimiter = ','; String[] substrings = headache.Split(delimiter); List <string> templist = new List <string>(); foreach (var substring in substrings) { templist.Add(substring); } templist[2] = "$" + templist[2]; templist[4] = "$" + templist[4]; templist[3] = templist[3].Insert(12, "$"); int count2 = 11 - templist[2].Length; if (count2 > 0) { templist[2] += new string('_', count2); } int count4 = 11 - templist[4].Length; if (count4 > 0) { templist[4] += new string('_', count4); } const string format = "{0,0} {1,13} {2,13}{3,26}{4,46}"; string test = string.Format(format, templist[0], templist[1], templist[2], templist[3], templist[4]); paymenthistorytxtbox.AppendText(test + "\n"); } if (line.Contains("Dealer Fee")) { String headache = values[0].ToString(); Char delimiter = ','; String[] substrings = headache.Split(delimiter); List <string> templist = new List <string>(); foreach (var substring in substrings) { templist.Add(substring); } templist[2] = "$" + templist[2]; templist[4] = "$" + templist[4]; templist[5] = "$" + templist[5]; int count2 = 11 - templist[2].Length; if (count2 > 0) { templist[2] += new string('_', count2); } int count4 = 11 - templist[4].Length; if (count4 > 0) { templist[4] += new string('_', count4); } int count5 = 11 - templist[5].Length; if (count5 > 0) { templist[5] = new string('_', count5) + templist[5]; } const string format = "{0,0} {1,13} {2,14}{3,25}{4,27} {5,12}"; string test = string.Format(format, templist[0], templist[1], templist[2], templist[3], templist[4], templist[5]); paymenthistorytxtbox.AppendText(test + "\n"); } if (line.Contains("Payment")) { String headache = values[0].ToString(); Char delimiter = ','; String[] substrings = headache.Split(delimiter); List <string> templist = new List <string>(); foreach (var substring in substrings) { templist.Add(substring); } templist[2] = "$" + templist[2]; templist[4] = "$" + templist[4]; templist[5] = "$" + templist[5]; int count2 = 11 - templist[2].Length; if (count2 > 0) { templist[2] += new string('_', count2); } int count4 = 11 - templist[4].Length; if (count4 > 0) { templist[4] += new string('_', count4); } int count5 = 11 - templist[5].Length; if (count5 > 0) { templist[5] = new string('_', count5) + templist[5]; } const string format = "{0,0} {1,13} {2,14}{3,22}{4,32} {5,12}"; string test = string.Format(format, templist[0], templist[1], templist[2], templist[3], templist[4], templist[5]); paymenthistorytxtbox.AppendText(test + "\n"); } if (line.Contains("Monthly Interest")) { String headache = values[0].ToString(); Char delimiter = ','; String[] substrings = headache.Split(delimiter); List <string> templist = new List <string>(); foreach (var substring in substrings) { templist.Add(substring); } templist[2] = "$" + templist[2]; templist[4] = "$" + templist[4]; templist[5] = "$" + templist[5]; int count2 = 11 - templist[2].Length; if (count2 > 0) { templist[2] += new string('_', count2); } int count4 = 11 - templist[4].Length; if (count4 > 0) { templist[4] += new string('_', count4); } int count5 = 11 - templist[5].Length; if (count5 > 0) { templist[5] = new string('_', count5) + templist[5]; } const string format = "{0,0} {1,13} {2,14}{3,28}{4,16} {5,10}"; string test = string.Format(format, templist[0], templist[1], templist[2], templist[3], templist[4], templist[5]); paymenthistorytxtbox.AppendText(test + "\n"); } } paymenthistorytxtbox.AppendText(Environment.NewLine); } }
private void editcustinfobtn_Click(object sender, EventArgs e) { marker = 1; cancelchangesbtn.Location = new Point(858, 581); cancelchangesbtn.Height = 109; cancelchangesbtn.Font = new Font("serif", 20); Paymentbtn.Hide(); confirmeditbtn.Show(); cancelchangesbtn.Show(); editcustinfobtn.Hide(); fnameprintlabel.Hide(); mnameprintlabel.Hide(); lnameprintlabel.Hide(); homephonelabel.Hide(); cellphonelabel.Hide(); workphonelabel.Hide(); addressline1data.Hide(); addressline2data.Hide(); citylabel.Hide(); statelabel.Hide(); makelabel.Hide(); modellabel.Hide(); yearlabel.Hide(); colorlabel.Hide(); VINlabel.Hide(); Vehicleloclabel.Hide(); vehiclecostdatalabel.Hide(); fnameprinttxtbox.Show(); mnameprinttxtbox.Show(); lnameprinttxtbox.Show(); homephonetxtbox.Show(); textBox2.Show(); textBox3.Show(); addressline1datatxtbox.Show(); addressline2datatxtbox.Show(); citytxtbox.Show(); statetxtbox.Show(); maketxtbox.Show(); modeltxtbox.Show(); yeartxtbox.Show(); colortxtbox.Show(); VINtxtbox.Show(); Vehicleloctxtbox.Show(); vehiclecostdatalabel.Show(); fnameprinttxtbox.Text = fnameprintlabel.Text; mnameprinttxtbox.Text = mnameprintlabel.Text; lnameprinttxtbox.Text = lnameprintlabel.Text; homephonetxtbox.Text = homephonelabel.Text; textBox2.Text = cellphonelabel.Text; textBox3.Text = workphonelabel.Text; addressline1datatxtbox.Text = addressline1data.Text; addressline2datatxtbox.Text = addressline2data.Text; citytxtbox.Text = citylabel.Text; statetxtbox.Text = statelabel.Text; maketxtbox.Text = makelabel.Text; modeltxtbox.Text = modellabel.Text; yeartxtbox.Text = yearlabel.Text; colortxtbox.Text = colorlabel.Text; VINtxtbox.Text = VINlabel.Text; Vehicleloctxtbox.Text = Vehicleloclabel.Text; vehiclecostdatalabel.Text = vehiclecostdatalabel.Text; itemidlabel.Text = itemid; }