protected void DownloadAll() { string url; generate_doc genContract = new generate_doc(); if (HttpContext.Current.Request.ApplicationPath == "/") { url = HttpContext.Current.Request.Url.Authority; } else { url = HttpContext.Current.Request.Url.Authority + "/" + HttpContext.Current.Request.ApplicationPath; } string final_path = "http://" + url + "/GeneratedDocument/" + genContract.GenerateDocumentPack(param_projid); //Response.Redirect(final_path); ClientScript.RegisterStartupScript(this.Page.GetType(), "", String.Format("window.open('{0}','newtab')", final_path), true); }
protected void btnForget_Click(object sender, EventArgs e) { string param_username = tbFuser.Text.Trim(); //string param_email = tbFemail.Text.Trim(); //string param_id = tbFidcard.Text.Trim(); string sql_check = " SELECT * FROM [BESTBoQ].[dbo].[userinfo] " + " WHERE [username] = '" + param_username + "'"; DataTable dt = ClassConfig.GetDataSQL(sql_check); if (dt.Rows.Count > 0) { string user_id = dt.Rows[0]["userid"].ToString(); generate_doc sendE = new generate_doc(); sendE.SendEmail(user_id); Response.Redirect("Default?r=forgetComplete"); //lbResult.Text = "ระบบได้ส่ง New Password ของท่านไปใน Email ที่ท่าน Register ไว้ในระบบ"; } else { lbResult.Text = "Information ที่ท่านใส่มาไม่ถูกต้อง"; } }