protected void Page_Load(object sender, EventArgs e) { if (Session["Email"] != null) { clientBL = new ClientBL(); cityBL = new CityBL(); client = clientBL.getClientByEmail(Session["Email"].ToString()); Email.Value = client.email; pass.Value = client.password; contactName.Value = client.contactName; NameC.Value = client.name; address.Value = client.address; city.Value = cityBL.getCityById(client.cityID); zipCode.Value = client.zipCode.ToString(); phone.Value = client.phone; contactPhone.Value = client.contactPhone; openTime.Value = client.openTime; status.Value = client.status.ToString(); } }
protected void createTable(int tabletype) { ClientBL clientBL = new ClientBL(); Table table = new Table(); List<Client> clientList = new List<Client>(); if (tabletype == 1) { clientList = clientBL.getNewClient(); table = newClientTable; } else if (tabletype == 2) { clientList = clientBL.GetAllClient(); table = allClientTable; } LevelPriceBL levePriceBL = new LevelPriceBL(); List<LevelPrice> levelList = levePriceBL.GetAllLevels(); CityBL cityBl = new CityBL(); for (int i = 0; i < clientList.Count; i++) { TableRow dr = new TableRow(); TableCell cell = new TableCell(); //cell.Text = clientList[i].id.ToString(); //dr.Cells.Add(cell); //cell = new TableCell(); cell.Text = clientList[i].name; dr.Cells.Add(cell); cell = new TableCell(); cell.Text = clientList[i].phone; dr.Cells.Add(cell); cell = new TableCell(); cell.Text = clientList[i].address; dr.Cells.Add(cell); cell = new TableCell(); cell.Text = cityBl.getCityById(clientList[i].cityID); dr.Cells.Add(cell); cell = new TableCell(); cell.Text = clientList[i].zipCode.ToString(); dr.Cells.Add(cell); cell = new TableCell(); cell.Text = clientList[i].contactName; dr.Cells.Add(cell); cell = new TableCell(); cell.Text = clientList[i].contactPhone; dr.Cells.Add(cell); cell = new TableCell(); cell.Text = clientList[i].openTime; dr.Cells.Add(cell); cell = new TableCell(); cell.Text = clientList[i].email; dr.Cells.Add(cell); cell = new TableCell(); cell.Text = clientList[i].password; dr.Cells.Add(cell); cell = new TableCell(); ///dropeDounList for level price/// DropDownList level = new DropDownList(); level.ID = "LevelStatus_" + tabletype.ToString()+"_" + i.ToString(); level.Items.Add(new ListItem("בחר דרגה", "-1")); foreach (etgarPlus.Classes.LevelPrice c in levelList) { level.Items.Add(new ListItem(c._level, c._id.ToString())); } if (clientList[i].levelPrice > 0) level.SelectedIndex = clientList[i].levelPrice; cell.Controls.Add(level); dr.Cells.Add(cell); /////////////////////end DropDounList//// HtmlAnchor statusButton = new HtmlAnchor(); statusButton.ID = "statusID_" + tabletype.ToString() + "_" + i.ToString(); statusButton.Attributes.Add("class", "StatusButton"); statusButton.HRef = "javascript:void(0);"; cell = new TableCell(); if (clientList[i].status.ToString().Equals("2")) { statusButton.InnerText = "עדכן"; } else if (clientList[i].status.ToString().Equals("1")) { statusButton.InnerText = "אישור"; } cell.Controls.Add(statusButton); dr.Cells.Add(cell); table.Rows.Add(dr); } //if (tabletype == 1) //{ // newClientTable = table; //} //else if (tabletype == 2) //{ // allClientTable = table; //} }
private void sendOrderEmail(string emailTo) { Client c = clientBl.getClientByEmail(Session["Email"].ToString()); CityBL cityBl = new CityBL(); string subject = "מערכת אתגר פלוס - התקבלה הזמנה חדשה"; string body = "<body dir=\"rtl\"><h3>זוהי הודעה אוטומטית ממערכת אתגר פלוס - להלן פרטי ההזמנה:</h3>"; body += "<div>שם הלקוח: " + c.contactName + "<br />"; body += "שם העסק: " + c.name + "<br />"; body += "טלפון העסק: " + c.phone + "<br />"; body += "כתובת: " + c.address + ", " + cityBl.getCityById(c.cityID) + ", " + c.zipCode + "<br />"; body += "שם איש הקשר: " + c.contactName + "<br />"; body += "טלפון איש הקשר: " + c.contactPhone + "<br />"; body += "כתובת דואר אלקטרוני: " + c.email + "</div><br /><hr /><br /><div>"; body += GetRenderResult(newListBikeTable); body += "</div></body>"; Global.sendEmail(subject, body, emailTo); }