public bool UpdateInformation(tblInformation infor) { if (infor != null && !infor.ID.Equals(Guid.Empty)) { var query = _dataContext.tblInformations.Where("ID.ToString()=@0", infor.ID.ToString()); if (query != null && query.ToList().Count > 0) { if (!String.IsNullOrEmpty(infor.ContactVN)) { query.ToList().First().ContactVN = infor.ContactVN; } if (!String.IsNullOrEmpty(infor.ContactEN)) { query.ToList().First().ContactEN = infor.ContactEN; } try { _dataContext.SubmitChanges(); return(true); } catch { return(false); } } } return(false); }
public bool InsertInformation(tblInformation infor) { if (infor != null && !infor.ID.Equals(Guid.Empty)) { try { _dataContext.tblInformations.InsertOnSubmit(infor); _dataContext.SubmitChanges(); return(true); } catch { return(false); } } return(false); }
public bool InsertInformation(tblInformation infor) { return(_da.InsertInformation(infor)); }
public bool UpdateInformation(tblInformation infor) { return(_da.UpdateInformation(infor)); }