public Boolean Update(tbl_MENU record) { try { var existrecord = GetByID(record.MenuID); db.Entry(existrecord).CurrentValues.SetValues(record); db.SaveChanges(); return(true); }catch (Exception ex) { throw ex; } }
public Boolean Save(tbl_MENU record) { try { db.MenuList.Add(record); db.SaveChanges(); return(true); } catch (Exception ex) { throw ex; } }
public Boolean Update(tbl_MENU record) { try { if (record == null) { throw new Exception("Invalid Parameter"); } if (!menudal.IsExistID(record.MenuID)) { throw new Exception("Record does not exist!"); } return(menudal.Update(record)); } catch (Exception ex) { throw ex; } }
public Boolean Save(tbl_MENU record) { try { if (record == null) { throw new Exception("Invalid Parameter"); } if (menudal.IsExistID(record.MenuID)) { throw new Exception("Record already exist!"); } return(menudal.Save(record)); } catch (Exception ex) { throw ex; } }