protected void Page_Load(object sender, EventArgs e) { try { if (Session["UserID"] != null) { //string Name_Hebrwo = ""; Garge garge = new Garge(Convert.ToInt32(Session["UserID"])); string city = garge.get_city(); Set_Wolcome_Time(); user_name.Text += garge.Get_Full_Name(); user_name2.Text = garge.Get_Full_Name(); user_name3.Text = garge.GetNameGarga(); UserName4.Text = garge.GetFirstName(); City_Name.Text = city; City_Name_Hebrwo.Text = city; Useremail.Text = garge.GetEmail(); Image1.ImageUrl = garge.GetimageUrl(); Image2.ImageUrl = garge.GetimageUrl(); Image3.ImageUrl = garge.GetimageUrl(); RendarCard(); } else { Response.Redirect("~/error-404.html"); } } catch (Exception ex) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", ex.ToString(), true); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["UserID"] != null) { Garge garge = new Garge(Convert.ToInt32(Session["UserID"])); string city = garge.get_city(); BisanceID.Attributes["placeholder"] = garge.GetNameGarga(); price.Attributes["placeholder"] = "₪" + garge.GetPricePerHour().ToString(); StreetID.Attributes["placeholder"] = garge.GetAddress(); emailId.Attributes["placeholder"] = garge.GetEmail(); PhoneId.Attributes["placeholder"] = garge.GetPhone(); } else { Response.Redirect("~/error-404.html"); } } catch (Exception ex) { ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", ex.ToString(), true); } }
public void setGarageInfo() { string teratmentID = Request.QueryString["tid"].ToString(); RepairJobl repairJob = new RepairJobl(Convert.ToInt32(teratmentID)); var amountsTime = repairJob.totalWorkingHours; Garge garge = new Garge(Convert.ToInt32(Session["UserID"])); LblbisanceName.Text = garge.GetNameGarga(); LblbisanceName2.Text = garge.GetNameGarga(); city.Text = garge.get_city(); lblstreet.Text = garge.GetAddress(); lblphone.Text = garge.GetPhone(); name.InnerText = garge.Get_Full_Name(); phonenumber.InnerText = garge.GetPhone(); email.InnerText = garge.GetEmail(); Phone.InnerText = garge.GetPhone(); mail.InnerText = garge.GetEmail(); priceHour.InnerText = garge.GetPricePerHour().ToString() + "₪"; amountTime.InnerText = amountsTime.ToString(); //////// DateTime currentTime = DateTime.Now; lbldatatime.Text = currentTime.ToString(); Random random = new Random(); lblidinvoic.Text = "##" + random.Next(10001, 9999999).ToString() + "##"; totelTimePrice.InnerText = string.Format("{0:0.00}", Convert.ToDouble((amountsTime * garge.GetPricePerHour())).ToString()) + "₪"; totelTimePrice2.InnerText = string.Format("{0:0.00}", Convert.ToDouble((amountsTime * garge.GetPricePerHour())).ToString()) + "₪"; totel = Convert.ToDouble((amountsTime * garge.GetPricePerHour())); }
protected void SendEmailByAdmin() { Garge garge = new Garge(Convert.ToInt32(Session["UserID"])); string Name = garge.GetNameGarga(); String Address = garge.GetAddress(); String City = garge.get_city(); String phone = garge.GetPhone(); if (EmailBLL.IsValidEmailAddress(tbEmail.Text)) { string path = @"C:\Users\isaya\OneDrive\שולחן העבודה\c#\GargeManger\EmailTamplate\NewCustomerAdd.html"; StreamReader sr = new StreamReader(path); string FullMessage = sr.ReadToEnd(); FullMessage = FullMessage.Replace("{UserName}", Fname.Text); FullMessage = FullMessage.Replace("{LastName}", Lname.Text); FullMessage = FullMessage.Replace("{NameGarga}", Name); FullMessage = FullMessage.Replace("{UserIdCard}", tbUser.Text); FullMessage = FullMessage.Replace(" {Address}", Address); FullMessage = FullMessage.Replace("{City}", City); FullMessage = FullMessage.Replace("{phone}", phone); sr.Close(); EmailBLL.SendMailMessage(tbEmail.Text, "*****@*****.**", null, null, "לקוח יקר", FullMessage, null); } }