예제 #1
0
 public bool addCTHDChi(CT_HoaDonChi cthdChi)
 {
     try
     {
         da = new QLCafeDataContext();
         da.CT_HoaDonChis.InsertOnSubmit(cthdChi);
         da.SubmitChanges();
         return(true);
     }
     catch (Exception ex) { throw new Exception(ex.Message); }
 }
예제 #2
0
        public bool deleteCTHDChi(string maHD, string maNL)
        {
            try
            {
                da = new QLCafeDataContext();

                CT_HoaDonChi hd = da.CT_HoaDonChis.Where(o => o.maHDC == maHD && o.maNL == maNL).FirstOrDefault();
                da.CT_HoaDonChis.DeleteOnSubmit(hd);
                da.SubmitChanges();
                return(true);
            }
            catch
            {
                return(false);
            }
        }