protected void BtnSend_Click(object sender, EventArgs e) { try { GlobFuncs.SendEmail(TxtEmail.Text.ToString(), "התקבלה פניה במערכת vancars", "<div style=\"text-align:center\"><h1>שלום " + TxtName.Text.ToString() + "</h1><h1>פנייתך נשלחה למערכת vancars</h1><br/><h4>להלן פרטי הפנייה שנשלחו אלינו</h4><br/>" + TxtMsg.Text.ToString() + "</br><h4>אנו נעשה כמיטב יכולתינו לטפל בפנייתך בהקדם</h4></div>"); GlobFuncs.SendEmail("*****@*****.**", "התקבלה פניה מאת " + TxtName.Text.ToString() + " בנושא " + TxtSubject.Text.ToString(), "<div style=\"text-align:center\">" + TxtMsg.Text.ToString() + "</div>"); showErrorMwssage(2010, ""); } catch (Exception Ex) { showErrorMwssage(0, Ex.Message); } }
protected void BtnForget_Click(object sender, EventArgs e) { if (TxtForget.Text == null) { TxtForget.Focus(); } else { TimingPass = GlobFuncs.ForgetPass(TxtForget.Text.ToString()); TxtTemporary.Visible = true; LtlMsg.Visible = true; BtnGo.Visible = true; //GlobFuncs.SendEmail(TxtForget.Text.ToString(), "שחזור סיסמה ממערכת VanCar", "הקוד הזמני הוא: " + TimingPass.ToString()); GlobFuncs.SendEmail(TxtForget.Text.ToString(), "שחזור סיסמה ממערכת VanCar", "<div style=\"text-align:center\"><h1>התקבלה בקשה לשחזור סיסמתך במערכת vancars</h1><h3>הקוד לשחזור הסיסמה הוא:" + TimingPass.ToString() + "</h3></div>"); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Company = Request["Company"]; Car = Request["CarId"]; creditCardId = Request["card"]; if (Car == null || Company == null || creditCardId == null || Session["search"] == null || Session["selectedExt"] == null || Session["person"] == null) { Response.Redirect("search.aspx"); } person person = (person)Session["person"]; searchBLL search = (searchBLL)Session["search"]; List <Extention> extention = new List <Extention>(); carDAL carDAL = new carDAL(Company, int.Parse(Car)); CarDetails carDetails = new CarDetails(); creaditCardBLL creditCard = new creaditCardBLL(); creditCard.getCardDetails(creditCardId); string[] arr = carDAL.GetDetails().Split('#'); string str = arr[0].Substring(2, arr[0].Length - 3).Replace("\\", ""); carDetails = JsonConvert.DeserializeObject <CarDetails>(str); extention = GlobFuncs.convertExtensionToList(Session["selectedExt"].ToString()); int totalPrice = int.Parse(Session["totPrice"].ToString()); double orderId; OrderBLL order = new OrderBLL(int.Parse(Company), totalPrice, int.Parse(search.PickupLocation), int.Parse(search.ReturnLocarion), DateTime.Parse(search.PickupDate), DateTime.Parse(search.ReturnDate), int.Parse(Car), extention, search, person, creditCard, Session["notes"].ToString()); if (Request["id"] == null) { List <string> OrderId = order.CreateOrder(); string o = ""; int num = 1; foreach (string i in OrderId) { o += "var a" + num + " = " + i + ";"; num++; } Order.Text = "<script>var or = " + JsonConvert.SerializeObject(order) + "\n var car = JSON.parse(" + arr[0] + "\") \n var companys = " + Application["Companys"] + "\n " + o + "</script>"; GlobFuncs.SendEmail(person.Email, "אישןר ביצוע הזמנה מס' " + OrderId[1], ""); sendMessages(person.CustomId, OrderId[1], person.FullName); LtlOrdId.Text = OrderId[0]; } else { double o = double.Parse(Request["id"]); orderId = o / 1825.8976; editOrderBll editOrder = new editOrderBll(int.Parse(Company), totalPrice, int.Parse(search.PickupLocation), int.Parse(search.ReturnLocarion), DateTime.Parse(search.PickupDate), DateTime.Parse(search.ReturnDate), int.Parse(Car), extention, search, person, creditCard, orderId.ToString(), Session["notes"].ToString()); int retOrder = editOrder.editOrder(); LtlOrdId.Text = orderId.ToString(); Order.Text = "<script> var or = " + JsonConvert.SerializeObject(order) + "\n var car = JSON.parse(" + arr[0] + "\") \n var companys = " + Application["Companys"] + "\n var a1 = " + orderId + "\n var a2 = " + GlobFuncs.getExtenalOrderIdByOrderId(int.Parse(orderId.ToString())) + "</script>"; LtlOrdId.Text = orderId.ToString(); } DataTable dtAdr = new DataTable(); dtAdr = GlobFuncs.GetFullAddress(person.CustomId); LtlName.Text = person.FullName; LtlPhone.Text = person.PhoneNumber; LtlEmail.Text = person.Email; LtlAddress.Text = dtAdr.Rows[0]["Address"] + " " + dtAdr.Rows[0]["CityName"].ToString(); Session["search"] = null; Session["orderQuery"] = null; Session["selectedExt"] = null; if (Request["id"] != null) { Response.Redirect("PrivateArea.aspx"); } } }