public string adresaci() { string adresat1 = dataGridView1.CurrentRow.Cells[4].Value.ToString(); string adresat2 = dataGridView1.CurrentRow.Cells[5].Value.ToString(); Smail.AddPH(); if (Smail.ListPH.Contains(adresat1)) { adresat1 = ""; } else { adresat1 = dataGridView1.CurrentRow.Cells[4].Value.ToString(); } if (Smail.ListPH.Contains(adresat2)) { adresat2 = ""; } else { adresat2 = dataGridView1.CurrentRow.Cells[5].Value.ToString(); } string adresaciMaila = adresat1.ToString() + ";" + adresat2.ToString(); return(adresaciMaila); }
private void negative_opinion_btn_Click(object sender, EventArgs e) { string powod = "Powód odrzucenia: " + negativetbox.Text; Get_Status_Insert_SAP_and_Mail("O"); Smail neg = new Smail(); string adresaciMaila = adresaci(); neg.SendEmail(adresaciMaila.ToString(), "<font=Times New Roman >" + "Zlecenie nr " + nzlec + " zostało odrzucone." + "<p><br>" + powod.ToString() + "<p><br>" + "</font>", "Zlecenie nr " + nzlec); MessageBox.Show("Treść: " + powod.ToString()); ClearData(); Read_Main(); }
private void opiniabtn_Click(object sender, EventArgs e) { string a = this.dataGridView1.CurrentRow.Cells[0].Value.ToString(); Smail m = new Smail(); m.SendEmail("*****@*****.**", "Zlecenie nr: " + a + " budzi moje wątpliwości. Proszę o opinię", "Automat Cen Test"); }
private void positive_opinion_btn_Click(object sender, EventArgs e) { string uwagi = "Uwagi: " + negativetbox.Text; Get_Status_Insert_SAP_and_Mail("P"); Smail poz = new Smail(); string adresaciMaila = adresaci(); poz.SendEmail(adresaciMaila.ToString(), "<font=Times New Roman >" + "Zlecenie nr " + nzlec + " dla klienta " + namofClientlbl.Text + " zostało zaakceptowane i przekazane do SAP" + "<p><br>" + uwagi.ToString() + "<p><br>" + "</font>" , "Zlecenie nr " + nzlec + " " + namofClientlbl.Text); ClearData(); Read_Main(); }