Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         DataTable dtDoiTac = AdvertiseService.Advertise_GetByPosition("3");
         rptDoiTac.DataSource = dtDoiTac;
         rptDoiTac.DataBind();
         DataTable dtSupport = SupportService.Support_GetByTop("2", "Active=1", "");
         if (dtSupport.Rows.Count > 0)
         {
             for (int i = 0; i < dtSupport.Rows.Count; i++)
             {
                 DataRow dr = dtSupport.Rows[i];
                 if (i == dtSupport.Rows.Count - 1)
                 {
                     ltrName.Text += string.Format("{0}: {1}", dr["Name"].ToString(), dr["Phone"].ToString());
                 }
                 else
                 {
                     ltrName.Text += string.Format("{0}: {1} | ", dr["Name"].ToString(), dr["Phone"].ToString());
                 }
             }
         }
     }
     catch (Exception ex)
     {
         MailSender.SendMail("", "", "Error System", ex.Message);
     }
 }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    // Hiển thị list Đối Tác
                    List <Advertise> listDoiTac = new List <Advertise>();
                    listDoiTac = AdvertiseService.Advertise_GetByPosition("3");
                    if (listDoiTac.Count > 0)
                    {
                        for (int i = 0; i < listDoiTac.Count; i++)
                        {
                            ltrDoiTac.Text += String.Format("<a href='{0}'><img src='{1}' alt='{2}' class='scrollimage' /></a>", listDoiTac[i].Link, listDoiTac[i].Image, listDoiTac[i].Name);
                        }
                    }

                    // Hiển thị list Khách hàng
                    List <Advertise> listKhachHang = new List <Advertise>();
                    listKhachHang = AdvertiseService.Advertise_GetByPosition("4");
                    if (listKhachHang.Count > 0)
                    {
                        for (int i = 0; i < listKhachHang.Count; i++)
                        {
                            ltrKhachHang.Text += String.Format("<a href='{0}'><img src='{1}' alt='{2}' class='scrollimage' /></a>", listKhachHang[i].Link, listKhachHang[i].Image, listKhachHang[i].Name);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MailSender.SendMail("", "", "Error System", ex.Message + "\n" + ex.StackTrace);
            }
        }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             List <Advertise> listBanner = new List <Advertise>();
             listBanner = AdvertiseService.Advertise_GetByPosition("2");
             if (listBanner.Count > 0)
             {
                 rptBanner.DataSource = listBanner;
                 rptBanner.DataBind();
             }
         }
         catch (Exception ex)
         {
             MailSender.SendMail("", "", "Error System", ex.Message + "\n" + ex.StackTrace);
         }
     }
 }