using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; public partial class Admin_Account_LedgerDetail : System.Web.UI.Page { // SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["cn"].ToString()); // string ToMail, FromMail, BodyMail, HeadMail; protected void Page_Load(object sender, EventArgs e) { } // private void mailSender2() // { // try // { // con.Open(); // SqlCommand cmd = new SqlCommand("viewLedger", con); // cmd.CommandType = CommandType.StoredProcedure; // cmd.Parameters.AddWithValue("@sessionId", 1); // cmd.Parameters.AddWithValue("@branchId", 9426); // cmd.Parameters.AddWithValue("@ledgerId",1); // cmd.Parameters.AddWithValue("@startDate", TextBox2.Text); // cmd.Parameters.AddWithValue("@endDate", 16 / 07 / 2018); // // SqlDataReader dr = cmd.ExecuteReader(); // SqlDataAdapter adapter = new SqlDataAdapter(cmd); // DataTable dt = new DataTable(); // string textBody = ""; // adapter.Fill(dt); // textBody = " "; // for (int loopCount = 0; loopCount < dt.Rows.Count-1; loopCount++) // { // textBody += ""; // } // textBody += "
tdbId masterAccount voucherNo voucherName TransType Credit Debit Date1 Remark mAccountName
" + dt.Rows[loopCount]["tdbId"] + " " + dt.Rows[loopCount]["masterAccount"] + " " + dt.Rows[loopCount]["voucherNo"] + " " + dt.Rows[loopCount]["voucherName"] + " " + dt.Rows[loopCount]["TransType"] + " " + dt.Rows[loopCount]["Credit"] + " " + dt.Rows[loopCount]["Debit"] + " " + dt.Rows[loopCount]["Date1"] + " " + dt.Rows[loopCount]["Remark"] + " " + dt.Rows[loopCount]["mAccountName"] + "
Total"+HiddenField1.Value+""+HiddenField2.Value+"
"; // BodyMail = @"
// //Gramin Shiksha // //
//Confirmation Mail //
//
//
// //
//
// "+textBody+@"; //
//
//
//This service is brought to you by - //
//
//Copyright @ graminshiksha.com //
//
//
//
//

//
// //
// // // //
//"; // HeadMail = "Gramin Shikha"; // //ToMail = "booking.mij@gmail.com"; // //booking.mij@gmail.com // ToMail = TextBox1.Text; //"kmahisarwebsite@gmail.com";//""; // //ToMail = "satnam.netkma@gmail.com"; // FromMail = "admin@graminshiksha.com"; // System.Net.Mail.MailMessage mail = new System.Net.Mail.MailMessage(); // SmtpClient SmtpServer = new SmtpClient(); // mail.To.Add(ToMail); // mail.From = new System.Net.Mail.MailAddress(FromMail); mail.Subject = HeadMail; // mail.Body = BodyMail; // mail.IsBodyHtml = true; // SmtpServer.Send(mail); // // Response.Redirect("contact_us.html?msg=Succssfully-Submit-!"); // Label1.Text = "Your Request Is Submitted Sucessfully"; // } // catch // { // Label1.Text = "your request have an error"; // } // } // protected void Button1_Click(object sender, EventArgs e) //{ // mailSender2(); //} }