Exemple #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        DAl    data  = new DAl();
        int    count = 4;
        string sql   = "SELECT TOP {0} id,title,sm,img FROM slider_news WHERE slider=1 ORDER BY id DESC";

        sql = string.Format(sql, count.ToString());
        rep_slider.DataSource = data.select(sql);
        rep_slider.DataBind();
    }
    protected void btnSend_Click(object sender, EventArgs e)
    {
        DAl    data   = new DAl();
        int    slider = 0;
        string path   = "";

        if (uploader.HasFile)
        {
            Random rnd      = new Random();
            string prename  = rnd.Next(10000, 9999999).ToString();
            string filename = uploader.PostedFile.FileName;
            path = "uploads/slider/" + prename + filename;
            uploader.SaveAs(Server.MapPath(path));
            slider = 1;
        }
        string sql = "INSERT INTO slider_news(title,sm,body,slider,img) VALUES('{0}','{1}','{2}','{3}','{4}')";

        sql = string.Format(sql, txttitle.Text.Trim(), txtsm.Text.Trim(), txtbody.Text.Trim(), slider, path);
        data.connect();
        data.docommand(sql);
        data.disconnect();
    }
 public BAThongKeChiPhi()
 {
     db = new DAl();
 }
 public BAKhachHang()
 {
     db = new DAl();
 }
Exemple #5
0
 public BACongNo()
 {
     db = new DAl();
 }
 public BAInHoaDon()
 {
     db = new DAl();
 }
 public BAThongKeSanPham()
 {
     db = new DAl();
 }
 public BALChiTietHDBanHang()
 {
     db = new DAl();
 }
 public BaNhaCungCap()
 {
     db = new DAl();
 }
 public BAHoaDonBanHang()
 {
     db = new DAl();
 }
Exemple #11
0
 public BATaiKhoan()
 {
     db = new DAl();
 }
Exemple #12
0
 public BALChiTietNhap()
 {
     db = new DAl();
 }
Exemple #13
0
 public BAServer()
 {
     db = new DAl();
 }
Exemple #14
0
 public BALoaiSP()
 {
     db = new DAl();
 }
Exemple #15
0
 public BABaoHanh()
 {
     db = new DAl();
 }
Exemple #16
0
 public BASanPham()
 {
     db = new DAl();
 }
Exemple #17
0
 public BAHoaDonNhapHang()
 {
     db = new DAl();
 }
 public BANhanVien()
 {
     db = new DAl();
 }