Esempio n. 1
0
 public bool SuaThongTinNo(eNhatKyGhiNo diary)
 {
     try
     {
         NhatKyGhiNo olddiary = db.NhatKyGhiNos.Where(x => x.IDKhachHang == diary.IDKhachHang).FirstOrDefault();
         olddiary.SoTienNo = diary.SoTienNo;
         db.SubmitChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Esempio n. 2
0
        public void CapNhatTinhTrangDia(int id, string text)
        {
            Dia dia = db.Dias.Where(x => x.MaDia == id).FirstOrDefault();

            dia.TinhTrangDia = text;
            db.SubmitChanges();
        }
Esempio n. 3
0
 public bool AddACustomer(eKhachHang khachhang)
 {
     try
     {
         KhachHang customer = new KhachHang();
         customer.MaKhachHang  = khachhang.MaKhachHang;
         customer.TenKhachHang = khachhang.TenKhachHang;
         customer.SoDienThoai  = khachhang.Phone;
         db.KhachHangs.InsertOnSubmit(customer);
         db.SubmitChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Esempio n. 4
0
 public bool ThemHangDoi(eHangDoi newhangDoi)
 {
     try
     {
         HangDoi hangdoi = new HangDoi();
         hangdoi.MaKhacHangs = newhangDoi.MaKhachHang;
         hangdoi.MaTuaDe     = newhangDoi.MaTuaDe;
         hangdoi.ThuTu       = newhangDoi.ThuTu;
         hangdoi.SoLuongDat  = newhangDoi.SoLuongDat;
         db.HangDois.InsertOnSubmit(hangdoi);
         db.SubmitChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Esempio n. 5
0
 public bool Save_Disc_Hire_Diary(eNhatKyThueDia newdiary)
 {
     try
     {
         NhatKyThueDia diary = new NhatKyThueDia();
         diary.MaDia       = newdiary.MaDia.ToString();
         diary.MaKH        = newdiary.MaKhachHang;
         diary.MaTua       = newdiary.MaTua;
         diary.NgayChoThue = newdiary.NgayChoThue;
         diary.NgayTraDia  = newdiary.NgayTraDia;
         diary.PhiTreHen   = newdiary.PhiTreHen;
         diary.SoLuongThue = newdiary.SoLuongThue;
         diary.TienDatCoc  = newdiary.TienDatCoc;
         ChinhTrangThaiThueDia(newdiary.MaDia, "Not Available");
         diary.tinhtrangtradia = "Chua tra";
         db.NhatKyThueDias.InsertOnSubmit(diary);
         db.SubmitChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }