public static bool UpdateOrderInfo(SubmitOrderEntity entity) { bool result = false; try { using (var context = new DbContext().ConnectionStringName("CrmRstV1", new SqlServerProvider())) { var rowsAffected = context.StoredProcedure("sp_UpdateOrderInfo") .Parameter("ContactName", entity.ContactName) .Parameter("ContactPhone", entity.ContactPhone) .Parameter("DiningDate", entity.DiningDate) .Parameter("OrderId", entity.OrderId) .Parameter("PersonCount", entity.PersonCount) .Parameter("sex", entity.sex).Execute(); result = rowsAffected > 0; } } catch (Exception ex) { //TODO Logger.Log(ex); } return result; }
public static bool UpdateOrderInfo(SubmitOrderEntity entity) { bool result = false; try { using (var context = new DbContext().ConnectionStringName("CrmRstV1", new SqlServerProvider())) { var rowsAffected = context.StoredProcedure("sp_UpdateOrderInfo") .Parameter("ContactName", entity.ContactName) .Parameter("ContactPhone", entity.ContactPhone) .Parameter("DiningDate", entity.DiningDate) .Parameter("OrderId", entity.OrderId) .Parameter("PersonCount", entity.PersonCount) .Parameter("sex", entity.sex).Execute(); result = rowsAffected > 0; } } catch (Exception ex) { //TODO Logger.Log(ex); } return(result); }