コード例 #1
0
        public UpdateMaterialMasterQM UpdateMaterialMaster(UpdateMaterialMasterCM updateMaterialMasterCM)
        {
            using (var connection = new DbConnectionProvider().CreateConnection())
            {
                connection.Open();

                var command = new MaterialMasterUpdateCommand {
                    Connection = connection
                };
                command.Execute(updateMaterialMasterCM);
            }

            return(new UpdateMaterialMasterQM());
        }
コード例 #2
0
        public UpdateMaterialMasterResponseDto UpdateMaterialMaster(UpdateMaterialMasterRequestDto updateMaterialMasterRequestDto)
        {
            UpdateMaterialMasterResponseDto updateMaterialMasterResponseDto = new UpdateMaterialMasterResponseDto();

            var cModel = new UpdateMaterialMasterCM
            {
                MaterialDescription      = updateMaterialMasterRequestDto.MaterialDescription,
                MaterialShortDescription = updateMaterialMasterRequestDto.MaterialShortDescription,
                MaterialCode             = updateMaterialMasterRequestDto.MaterialCode
            };

            var response = materialMasterRepository.UpdateMaterialMaster(cModel);

            return(new UpdateMaterialMasterResponseDto());
        }
コード例 #3
0
        public void Execute(UpdateMaterialMasterCM model)
        {
            using (var sqlCommand = CreateCommand())
            {
                sqlCommand.Connection  = Connection;
                sqlCommand.CommandText = "[dbo].uspUpdateMaterialMaster";
                sqlCommand.CommandType = CommandType.StoredProcedure;

                sqlCommand.Parameters.Add(AddParameter("@MaterialCode", SsDbType.Int, ParameterDirection.Input, Convert.ToInt32(model.MaterialCode)));
                sqlCommand.Parameters.Add(AddParameter("@MaterialDescription", SsDbType.VarChar, ParameterDirection.Input, model.MaterialDescription));
                sqlCommand.Parameters.Add(AddParameter("@MaterialShortDescription", SsDbType.VarChar, ParameterDirection.Input, model.MaterialShortDescription));
                sqlCommand.Parameters.Add(AddParameter("@UpdatedBy", SsDbType.UniqueIdentifier, ParameterDirection.Input, new Guid()));
                sqlCommand.Parameters.Add(AddParameter("@UpdatedDateTime", SsDbType.DateTime, ParameterDirection.Input, DateTime.UtcNow));
                sqlCommand.ExecuteNonQuery();
            }
        }