public int UpdatePriceEnery(t_EE_PriceEnery model) { try { return(_dbFactory.priceEnery.UpdatePriceEnery(model)); } catch (Exception ex) { throw ex; } }
public int UpdatePriceEnery(t_EE_PriceEnery model) { string sql = $@"UPDATE [dbo].[t_EE_PriceEnery] SET [UID] = {model.UID} ,[CollTypeID] = {model.CollTypeID} ,[Ladder] = {model.Ladder} ,[LadderValue] = '{model.LadderValue}' ,[Price] = {model.Price} WHERE ID={model.ID}"; return(ExecuteSqlCommand(sql)); }
public int InserPriceEnery(t_EE_PriceEnery model) { string sql = $@"INSERT INTO [dbo].[t_EE_PriceEnery] ([UID] ,[CollTypeID] ,[Ladder] ,[LadderValue] ,[Price]) VALUES ({model.UID} ,{model.CollTypeID} ,{model.Ladder} ,'{model.LadderValue}' ,{model.Price})"; return(ExecuteSqlCommand(sql)); }