public static bool ThemCongNo(CONGNO congno) { try { db.CONGNO.Add(congno); db.SaveChanges(); return(true); } catch (Exception ex) { return(false); } }
public static bool CapNhatCongNo(CONGNO congno) { try { var l = db.CONGNO.Find(congno.MACONGNO); l.TIENCONNO = congno.TIENCONNO; l.TONGTIEN = congno.TONGTIEN; l.NGAYTRA = congno.NGAYTRA; l.TRANGTHAI = congno.TRANGTHAI; db.SaveChanges(); return(true); } catch (Exception ex) { return(false); } }