public bool AddCate(cat catss)
    {

        LQDataContext ctxs = new LQDataContext();
        ctxs.cats.InsertOnSubmit(catss);
        ctxs.SubmitChanges();
        return true;
    }
    public void UpdateCate(cat ca)
    {
        try
        {
            LQDataContext ctxx = new LQDataContext();
            var q = ctxx.cats.Where(d => d.id_cat == ca.id_cat).SingleOrDefault();
            q.cat_name = ca.cat_name;
            ctxx.SubmitChanges();
        }
        catch (Exception ex)
        {

        }
    }
Exemplo n.º 3
0
    public bool AddCart(customer_cart_time ca)
    {
        LQDataContext ctxs = new LQDataContext();

        ctxs.customer_cart_times.InsertOnSubmit(ca);
        ctxs.SubmitChanges();
        return(true);
    }
    public bool AddCate(cat catss)
    {
        LQDataContext ctxs = new LQDataContext();

        ctxs.cats.InsertOnSubmit(catss);
        ctxs.SubmitChanges();
        return(true);
    }
Exemplo n.º 5
0
    public bool AddProduct(category_product_detail pr)
    {
        LQDataContext ctxs = new LQDataContext();

        ctxs.category_product_details.InsertOnSubmit(pr);
        ctxs.SubmitChanges();
        return(true);
    }
    public bool AddProduct(prod pr)
    {
        LQDataContext ctxs = new LQDataContext();

        ctxs.prods.InsertOnSubmit(pr);
        ctxs.SubmitChanges();
        return(true);
    }
    public bool AddCustomer(cust ca)
    {
        LQDataContext ctxs = new LQDataContext();

        ctxs.custs.InsertOnSubmit(ca);
        ctxs.SubmitChanges();
        return(true);
    }
    public bool AddimgProd(img_prod imp)
    {
        LQDataContext ctxs = new LQDataContext();

        ctxs.img_prods.InsertOnSubmit(imp);
        ctxs.SubmitChanges();
        return(true);
    }
    public bool AdddtCart(detail_cart ca)
    {
        LQDataContext ctxs = new LQDataContext();

        ctxs.detail_carts.InsertOnSubmit(ca);
        ctxs.SubmitChanges();
        return(true);
    }
Exemplo n.º 10
0
    public bool AddimgProd(product_image imp)
    {
        LQDataContext ctxs = new LQDataContext();

        ctxs.product_images.InsertOnSubmit(imp);
        ctxs.SubmitChanges();
        return(true);
    }
    public void updatedtCart(detail_cart dtc)
    {
        LQDataContext ctxx = new LQDataContext();
        var           q    = ctxx.detail_carts.Where(d => d.id_dtcart == dtc.id_dtcart).SingleOrDefault();

        q.id_pro   = dtc.id_pro;
        q.quanlity = dtc.quanlity;
        ctxx.SubmitChanges();
    }
Exemplo n.º 12
0
 public void UpdateUserPass(user_detail un)
 {
     try
     {
         LQDataContext ctxx = new LQDataContext();
         var           q    = ctxx.user_details.Where(d => d.user_id == un.user_id).SingleOrDefault();
         q.user_password = un.user_password;
         ctxx.SubmitChanges();
     }
     catch (Exception ex)
     {
     }
 }
 public void UpdateCate(cart ca)
 {
     try
     {
         LQDataContext ctxx = new LQDataContext();
         var           q    = ctxx.carts.Where(d => d.id_cart == ca.id_cart).SingleOrDefault();
         q.time_cart = ca.time_cart;
         ctxx.SubmitChanges();
     }
     catch (Exception ex)
     {
     }
 }
 public void SetSttImage(img_prod imp, int mstt)
 {
     try
     {
         LQDataContext ctxx = new LQDataContext();
         var           q    = ctxx.img_prods.Where(d => d.id_img == imp.id_img).SingleOrDefault();
         q.stt_img = mstt;
         ctxx.SubmitChanges();
     }
     catch (Exception ex)
     {
     }
 }
 public void UpdateimgProd(img_prod imp)
 {
     try
     {
         LQDataContext ctxx = new LQDataContext();
         var           q    = ctxx.img_prods.Where(d => d.id_img == imp.id_img).SingleOrDefault();
         q.img_url = imp.img_url;
         ctxx.SubmitChanges();
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 16
0
 public void UpdateCate(category_name ca)
 {
     try
     {
         LQDataContext ctxx = new LQDataContext();
         var           q    = ctxx.category_names.Where(d => d.id_cat == ca.id_cat).SingleOrDefault();
         q.cat_name = ca.cat_name;
         ctxx.SubmitChanges();
     }
     catch (Exception ex)
     {
     }
 }
 public void UpdateUserPass(user_name un)
 {
     try
     {
         LQDataContext ctxx = new LQDataContext();
         var           q    = ctxx.user_names.Where(d => d.id_user == un.id_user).SingleOrDefault();
         q.password = un.password;
         ctxx.SubmitChanges();
     }
     catch (Exception ex)
     {
     }
 }
 public void UpdateCustomer(cust ca)
 {
     try
     {
         LQDataContext ctxx = new LQDataContext();
         var           q    = ctxx.custs.Where(d => d.id_cus == ca.id_cus).SingleOrDefault();
         q.cus_name = ca.cus_name;
         q.email    = ca.email;
         ctxx.SubmitChanges();
     }
     catch (Exception ex)
     {
     }
 }
    public void UpdateUserPass(user_name un)
    {
        try
        {
            LQDataContext ctxx = new LQDataContext();
            var q = ctxx.user_names.Where(d => d.id_user == un.id_user).SingleOrDefault();
            q.password = un.password;
            ctxx.SubmitChanges();
        }
        catch (Exception ex)
        {

        }
    }
 public void UpdateProduct(prod pr)
 {
     try
     {
         LQDataContext ctxx = new LQDataContext();
         var           q    = ctxx.prods.Where(d => d.id_pro == pr.id_pro).SingleOrDefault();
         q.id_cat    = pr.id_cat;
         q.pro_name  = pr.pro_name;
         q.pro_price = pr.pro_price;
         ctxx.SubmitChanges();
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 21
0
 public bool DeleteProduct(int id)
 {
     try
     {
         LQDataContext dm = new LQDataContext();
         var           q  = (from a in dm.category_product_details
                             where a.id_pro == id
                             select a).SingleOrDefault();
         dm.category_product_details.DeleteOnSubmit(q);
         dm.SubmitChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
 public bool DeleteImgProd(int id)
 {
     try
     {
         LQDataContext dm = new LQDataContext();
         var           q  = (from a in dm.img_prods
                             where a.id_img == id
                             select a).SingleOrDefault();
         dm.img_prods.DeleteOnSubmit(q);
         dm.SubmitChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
 public void UpdateUser(user_name un)
 {
     try
     {
         LQDataContext ctxx = new LQDataContext();
         var           q    = ctxx.user_names.Where(d => d.id_user == un.id_user).SingleOrDefault();
         q.user_name1 = un.user_name1;
         q.usFulname  = un.usFulname;
         q.usImg      = un.usImg;
         q.usAge      = un.usAge;
         q.email      = un.email;
         ctxx.SubmitChanges();
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 24
0
 public void UpdateUser(user_detail un)
 {
     try
     {
         LQDataContext ctxx = new LQDataContext();
         var           q    = ctxx.user_details.Where(d => d.user_id == un.user_id).SingleOrDefault();
         q.user_name      = un.user_name;
         q.user_fullname  = un.user_fullname;
         q.user_pro_image = un.user_pro_image;
         q.user_age       = un.user_age;
         q.user_email     = un.user_email;
         ctxx.SubmitChanges();
     }
     catch (Exception ex)
     {
     }
 }
 public bool DeletedtCart(int id_dtCart)
 {
     try
     {
         LQDataContext dm = new LQDataContext();
         var           q  = (from a in dm.detail_carts
                             where a.id_dtcart == id_dtCart
                             select a).SingleOrDefault();
         dm.detail_carts.DeleteOnSubmit(q);
         dm.SubmitChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
 public bool DeleteCustomer(int id)
 {
     try
     {
         LQDataContext dm = new LQDataContext();
         var           q  = (from a in dm.custs
                             where a.id_cus == id
                             select a).SingleOrDefault();
         dm.custs.DeleteOnSubmit(q);
         dm.SubmitChanges();
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
    public void UpdateUser(user_name un)
    {
        try
        {
            LQDataContext ctxx = new LQDataContext();
            var q = ctxx.user_names.Where(d => d.id_user == un.id_user).SingleOrDefault();
            q.user_name1 = un.user_name1;
            q.usFulname = un.usFulname;
            q.usImg = un.usImg;
            q.usAge = un.usAge;
            q.email = un.email;
            ctxx.SubmitChanges();
        }
        catch (Exception ex)
        {

        }
    }
 public bool AdddtCart(detail_cart ca)
 {
     LQDataContext ctxs = new LQDataContext();
     ctxs.detail_carts.InsertOnSubmit(ca);
     ctxs.SubmitChanges();
     return true;
 }
 public void updatedtCart(detail_cart dtc)
 {
     LQDataContext ctxx = new LQDataContext();
     var q = ctxx.detail_carts.Where(d => d.id_dtcart == dtc.id_dtcart).SingleOrDefault();
     q.id_pro = dtc.id_pro;
     q.quanlity = dtc.quanlity;
     ctxx.SubmitChanges();
 }
    public bool DeletedtCart(int id_dtCart)
    {
        try
        {
            LQDataContext dm = new LQDataContext();
            var q = (from a in dm.detail_carts
                     where a.id_dtcart == id_dtCart
                     select a).SingleOrDefault();
            dm.detail_carts.DeleteOnSubmit(q);
            dm.SubmitChanges();
            return true;
        }
        catch (Exception ex)
        {
            return false;
        }

    }
 public bool AddimgProd(img_prod imp)
 {
     LQDataContext ctxs = new LQDataContext();
     ctxs.img_prods.InsertOnSubmit(imp);
     ctxs.SubmitChanges();
     return true;
 }
    public void SetSttImage(img_prod imp, int mstt)
    {
        try
        {
            LQDataContext ctxx = new LQDataContext();
            var q = ctxx.img_prods.Where(d => d.id_img == imp.id_img).SingleOrDefault();
            q.stt_img = mstt;
            ctxx.SubmitChanges();
        }
        catch (Exception ex)
        {

        }
    }
    public void UpdateimgProd(img_prod imp)
    {
        try
        {
            LQDataContext ctxx = new LQDataContext();
            var q = ctxx.img_prods.Where(d => d.id_img == imp.id_img).SingleOrDefault();
            q.img_url = imp.img_url;
            ctxx.SubmitChanges();
        }
        catch (Exception ex)
        {

        }
    }
    public bool DeleteImgProd(int id)
    {
        try
        {
            LQDataContext dm = new LQDataContext();
            var q = (from a in dm.img_prods
                     where a.id_img == id
                     select a).SingleOrDefault();
            dm.img_prods.DeleteOnSubmit(q);
            dm.SubmitChanges();
            return true;
        }
        catch (Exception ex)
        {
            return false;
        }

    }
    public void UpdateCustomer(cust ca)
    {
        try
        {
            LQDataContext ctxx = new LQDataContext();
            var q = ctxx.custs.Where(d => d.id_cus == ca.id_cus).SingleOrDefault();
            q.cus_name = ca.cus_name;
            q.email = ca.email;
            ctxx.SubmitChanges();
        }
        catch (Exception ex)
        {

        }
    }
 public bool AddCustomer(cust ca)
 {
     LQDataContext ctxs = new LQDataContext();
     ctxs.custs.InsertOnSubmit(ca);
     ctxs.SubmitChanges();
     return true;
 }
    public void UpdateProduct(prod pr)
    {
        try
        {
            LQDataContext ctxx = new LQDataContext();
            var q = ctxx.prods.Where(d => d.id_pro == pr.id_pro).SingleOrDefault();
            q.id_cat = pr.id_cat;
            q.pro_name = pr.pro_name;
            q.pro_price = pr.pro_price;
            ctxx.SubmitChanges();
        }
        catch (Exception ex)
        {

        }
    }
 public bool AddProduct(prod pr)
 {
     LQDataContext ctxs = new LQDataContext();
     ctxs.prods.InsertOnSubmit(pr);
     ctxs.SubmitChanges();
     return true;
 }
    public bool DeleteCustomer(int id)
    {
        try
        {
            LQDataContext dm = new LQDataContext();
            var q = (from a in dm.custs
                     where a.id_cus == id
                     select a).SingleOrDefault();
            dm.custs.DeleteOnSubmit(q);
            dm.SubmitChanges();
            return true;
        }
        catch (Exception ex)
        {
            return false;
        }

    }