public bool DeleteShippingTerms(long shipping_terms_id) { try { shipping_terms oShippingTerms = _entities.shipping_terms.FirstOrDefault(st => st.shipping_terms_id == shipping_terms_id); oShippingTerms.is_deleted = true; _entities.SaveChanges(); return(true); } catch (Exception ex) { return(false); } }
public bool UpdateShippingTerms(shipping_terms oShippingTerms) { try { shipping_terms con = _entities.shipping_terms.Find(oShippingTerms.shipping_terms_id); con.shipping_terms_name = oShippingTerms.shipping_terms_name; con.updated_date = DateTime.Now; con.is_active = oShippingTerms.is_active; _entities.SaveChanges(); return(true); } catch (Exception ex) { return(false); } }
public bool InsertShippingTerms(shipping_terms oShippingTerms) { try { shipping_terms insertShippingTerms = new shipping_terms { shipping_terms_name = oShippingTerms.shipping_terms_name, created_by = oShippingTerms.created_by, created_date = oShippingTerms.created_date, updated_by = oShippingTerms.updated_by, updated_date = oShippingTerms.updated_date, is_active = oShippingTerms.is_active, is_deleted = oShippingTerms.is_deleted }; _entities.shipping_terms.Add(insertShippingTerms); _entities.SaveChanges(); return(true); } catch (Exception ex) { return(false); } }