public UpdateMachineMasterResponseDto UpdateMachineMaster(UpdateMachineMasterRequestDto updateMachineMasterRequestDto) { var cModel = new UpdateMachineMasterCM() { MachineCode = updateMachineMasterRequestDto.MachineCode, MachineName = updateMachineMasterRequestDto.MachineName, AddedDate = updateMachineMasterRequestDto.AddedDate }; var response = machineMastersRepository.UpdateMachineMaster(cModel); return(new UpdateMachineMasterResponseDto()); }
public UpdateMachineMasterQM UpdateMachineMaster(UpdateMachineMasterCM updateMachineMasterCM) { using (var connection = new DbConnectionProvider().CreateConnection()) { connection.Open(); var command = new MachineMasterUpdateCommand { Connection = connection }; command.Execute(updateMachineMasterCM); } return(new UpdateMachineMasterQM()); }
public void Execute(UpdateMachineMasterCM model) { using (var sqlCommand = CreateCommand()) { sqlCommand.Connection = Connection; sqlCommand.CommandText = "[dbo].uspUpdateMachineMaster"; sqlCommand.CommandType = CommandType.StoredProcedure; sqlCommand.Parameters.Add(AddParameter("@MachineCode", SsDbType.Decimal, ParameterDirection.Input, Convert.ToInt32(model.MachineCode))); sqlCommand.Parameters.Add(AddParameter("@MachineName", SsDbType.VarChar, ParameterDirection.Input, model.MachineName)); sqlCommand.Parameters.Add(AddParameter("@AddedDate", SsDbType.DateTime, ParameterDirection.Input, model.AddedDate)); sqlCommand.Parameters.Add(AddParameter("@UpdatedBy", SsDbType.UniqueIdentifier, ParameterDirection.Input, new Guid())); sqlCommand.Parameters.Add(AddParameter("@UpdatedDateTime", SsDbType.DateTime, ParameterDirection.Input, DateTime.UtcNow)); sqlCommand.ExecuteNonQuery(); } }