public bool insertChiTiet(THAMDUDAIHOI data)
 {
     try
     {
         using (QLHTDOANVIENDataContext db = new QLHTDOANVIENDataContext())
         {
             db.THAMDUDAIHOIs.InsertOnSubmit(data);
             db.SubmitChanges();
             return(true);
         }
     }
     catch (Exception e)
     {
         Console.WriteLine(e.Message.ToString());
     }
     return(false);
 }
        public bool setStatus(Guid idDV, Guid idDH)
        {
            THAMDUDAIHOI data = new THAMDUDAIHOI();

            try
            {
                using (QLHTDOANVIENDataContext db = new QLHTDOANVIENDataContext())
                {
                    data = db.THAMDUDAIHOIs.Where(p => p.MASODH == idDH && p.MASODV == idDV).SingleOrDefault();
                    if (data != null)
                    {
                        data.TRANGTHAI = true;
                        db.SubmitChanges();
                        return(true);
                    }
                }
            }
            catch (Exception)
            {
            }
            return(false);
        }
Exemple #3
0
 private void detach_THAMDUDAIHOIs(THAMDUDAIHOI entity)
 {
     this.SendPropertyChanging();
     entity.DOANVIEN = null;
 }
Exemple #4
0
 partial void DeleteTHAMDUDAIHOI(THAMDUDAIHOI instance);
Exemple #5
0
 partial void UpdateTHAMDUDAIHOI(THAMDUDAIHOI instance);
Exemple #6
0
 partial void InsertTHAMDUDAIHOI(THAMDUDAIHOI instance);
Exemple #7
0
 private void attach_THAMDUDAIHOIs(THAMDUDAIHOI entity)
 {
     this.SendPropertyChanging();
     entity.DAIHOI = this;
 }